|
@@ -608,7 +608,7 @@ def monitor():
|
|
|
now_time = int(time.time())
|
|
|
monitor_start_timestamp = now_time - const.MONITOR_PERIOD
|
|
|
select_sql = f"""
|
|
|
- SELECT ghId, accountName, title, ContentUrl, wx_sn
|
|
|
+ SELECT ghId, accountName, title, ContentUrl, wx_sn, from_unixtime(publish_timestamp) AS publish_timestamp
|
|
|
FROM {ARTICLE_TABLE}
|
|
|
WHERE publish_timestamp >= {monitor_start_timestamp};
|
|
|
"""
|
|
@@ -619,6 +619,7 @@ def monitor():
|
|
|
title = article[2]
|
|
|
url = article[3]
|
|
|
wx_sn = article[4]
|
|
|
+ publish_timestamp = article[5]
|
|
|
try:
|
|
|
response = spider.get_article_text(url, is_cache=False)
|
|
|
response_code = response['code']
|
|
@@ -629,7 +630,8 @@ def monitor():
|
|
|
"ghId": gh_id,
|
|
|
"accountName": account_name,
|
|
|
"title": title,
|
|
|
- "wx_sn": str(wx_sn)
|
|
|
+ "wx_sn": str(wx_sn),
|
|
|
+ "publish_date": publish_timestamp
|
|
|
},
|
|
|
mention=False
|
|
|
)
|