article update

This commit is contained in:
Andreas Stephanides
2017-01-16 13:24:19 +01:00
parent 9dc49e83df
commit 7e90ce324d
3 changed files with 9 additions and 4 deletions

View File

@@ -98,8 +98,7 @@ def handle(handler,msg):
lg.debug(msg['data'])
def make_article_json(art):
res={"type":"article", "title":art.title, "id": str(art.id), "url": art.url, "message_text": art.title + " " + art.url}
res={"type":"article", "title":art.title+" (" +str(art.section.title())+")", "id": str(art.id), "url": art.url, "message_text": art.title + " " + art.url}
if art.image != None:
lg.debug("http://crawler.fachschaften.at/"+str(art.image))
res["thumb_url"]="http://crawler.fachschaften.at/"+str(art.image)