Commit e178fa73 authored by litaolemo's avatar litaolemo

update

parent 099c83b1
......@@ -129,6 +129,7 @@ def scan_from_redis(push_rule_class_list) -> Dict:
comment_count = 0
favorite_count = 0
for count, re in enumerate(res_list):
out_ts = datetime.datetime.now().timestamp() * 1e3 - 86400000
one_data = json.loads(re)
if count == 0:
fetch_time = one_data.get("fetch_time")
......@@ -271,12 +272,18 @@ def push_data_to_user(res_data: Dict) -> Dict:
# 替换图片
if res_data["platform"] == "weibo":
res_data["qiniu_img_list"] = qiniu_img_list
try:
if qiniu_img_list:
for img_url in qiniu_img_list:
res_data["title"] = res_data["title"] + '<img src="%s">' % img_url
except Exception as e:
print("line 280 error %s" % e)
if "http://t.cn/" in res_data["title"]:
res_data["title"] = res_data["title"].split("http://t.cn/")[0]
res_data["content"] = res_data["title"]
if qiniu_img_list:
for img_url in qiniu_img_list:
res_data["title"] = res_data["title"] + '<img src="%s">' % img_url
elif res_data["platform"] == "douban":
content = res_data.get("content")
if content:
......
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