Commit ea467720 authored by litaolemo's avatar litaolemo

update

parent 209fc8b6
...@@ -329,8 +329,12 @@ class Crawler_toutiao(): ...@@ -329,8 +329,12 @@ class Crawler_toutiao():
content = res_json["data"].get("content").replace("\r", "").replace("\n", "") content = res_json["data"].get("content").replace("\r", "").replace("\n", "")
except: except:
content = "" content = ""
try:
title = res_json["data"].get("title").replace("\r", "").replace("\n", "")
except:
title = ""
res_dic = { res_dic = {
"title": res_json["data"].get("title").replace("\r", "").replace("\n", ""), "title":title,
'high_quality_flag': int(res_json["data"].get('high_quality_flag')), 'high_quality_flag': int(res_json["data"].get('high_quality_flag')),
"play_count": int(res_json["data"].get('impression_count')), "play_count": int(res_json["data"].get('impression_count')),
"comment_count": res_json["data"].get("comment_count"), "comment_count": res_json["data"].get("comment_count"),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment