limit messages to console
This commit is contained in:
parent
19aedaaa01
commit
df1d257438
1 changed files with 4 additions and 5 deletions
|
@ -48,8 +48,8 @@ def process_diff(old, new, rss_id):
|
|||
diff = dmp.diff_main(old['title'], new['title'])
|
||||
dmp.diff_cleanupSemantic(diff)
|
||||
html_diff = dmp.diff_prettyHtml(diff)
|
||||
print(old['link'])
|
||||
print(diff)
|
||||
# print(old['link'])
|
||||
# print(diff)
|
||||
|
||||
sql = "INSERT INTO diffs(feed_name, article_url, title_orig, title_new, diff_html, diff_time) VALUES (?,?,?,?,?,datetime('now', 'localtime'))"
|
||||
sql_data = (old['medium'], old['link'], old['title'], new['title'], html_diff)
|
||||
|
@ -64,7 +64,7 @@ def process_item(article, rc):
|
|||
old = json.loads(rc.get(article['rss_id']))
|
||||
new = article['content']
|
||||
if old['title'] != new['title']:
|
||||
print('Article changed. World is fucked.')
|
||||
# print('Article changed. World is fucked.')
|
||||
diff = process_diff(old, new, article['rss_id'])
|
||||
write_article(article, rc)
|
||||
return(True)
|
||||
|
@ -105,5 +105,4 @@ for feed in config['feeds']:
|
|||
article_count += 1
|
||||
process_item(article, rc)
|
||||
|
||||
print("Processed articles:")
|
||||
print(article_count)
|
||||
print("Processed articles: " + article_count)
|
Loading…
Reference in a new issue