que all / que

This commit is contained in:
Andreas Stephanides
2017-01-24 11:25:07 +01:00
parent 5006c9fbe3
commit debf6b0ccc
5 changed files with 39 additions and 13 deletions

View File

@@ -29,7 +29,7 @@ def process_article(art):
aa.sourcetype=art["sourcetype"]
db_session.add(aa)
db_session.commit()
clogger.debug("Updated/Added Article "+ str(aa.id) + ": " + (aa.title.encode("utf-8")))
clogger.info("Updated/Added Article "+ str(aa.id) + ": " + (aa.title.encode("utf-8")))
# announce_articleid(aa.id)
return aa
@@ -47,15 +47,20 @@ def process_urllist(urllist, tpe, parent_url):
process_url(u,tpe, parent_url)
def do_process(tpe, cont):
def do_process(tpe, cont,params={}):
urllist=[]
# clogger.debug("process :" + str(cont))
if "article_links" in cont:
process_urllist(cont["article_links"], article_types[tpe], cont["url"])
if "index_links" in cont:
process_urllist(cont["index_links"], tpe , cont["url"])
if params.has_key("nofollow") and params["nofollow"]:
nofollow=True
else:
nofollow=False
if "next_page" in cont and cont["next_page"] is not None:
if "next_page" in cont and (cont["next_page"] is not None) and (not nofollow):
process_url(cont["next_page"],tpe, cont["url"])
if "article" in cont: