Commit f6df7c42 authored by litaolemo's avatar litaolemo

update

parent ea467720
......@@ -330,13 +330,17 @@ class Crawler_toutiao():
except:
content = ""
try:
title = res_json["data"].get("title").replace("\r", "").replace("\n", "")
title = res_json["data"].get("title").replace("\r", "").replace("\n", "")
except:
title = ""
try:
play_count = int(res_json["data"].get('impression_count'))
except:
play_count = 0
res_dic = {
"title":title,
'high_quality_flag': int(res_json["data"].get('high_quality_flag')),
"play_count": int(res_json["data"].get('impression_count')),
"play_count": play_count,
"comment_count": res_json["data"].get("comment_count"),
"repost_count": res_json["data"].get("repost_count"),
"favorite_count": res_json["data"].get("digg_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