|
@@ -137,11 +137,16 @@ class Bot:
|
|
|
first_download_time = sheet[1][5]
|
|
|
first_download_time = int(time.mktime(time.strptime(first_download_time, "%Y/%m/%d %H:%M:%S")))
|
|
|
|
|
|
- elif crawler == "shipinhao":
|
|
|
+ elif crawler == "shipinhao_recommend":
|
|
|
sheet = Feishu.get_values_batch(log_type, "shipinhao", "c77cf9")
|
|
|
# 已下载表,最新一条视频抓取时间
|
|
|
first_download_time = sheet[1][5]
|
|
|
first_download_time = int(time.mktime(time.strptime(first_download_time, "%Y/%m/%d %H:%M:%S")))
|
|
|
+ elif crawler == "shipinhao_follow":
|
|
|
+ sheet = Feishu.get_values_batch(log_type, "shipinhao", "KsVtLe")
|
|
|
+ # 已下载表,最新一条视频抓取时间
|
|
|
+ first_download_time = sheet[1][5]
|
|
|
+ first_download_time = int(time.mktime(time.strptime(first_download_time, "%Y/%m/%d %H:%M:%S")))
|
|
|
|
|
|
elif crawler == "zongjiao":
|
|
|
sheet = Feishu.get_values_batch(log_type, "zongjiao", "xf9wC2")
|
|
@@ -276,9 +281,12 @@ class Bot:
|
|
|
Common.logger(log_type).warning("微视已下载表,超过24小时没有新视频入库了😤\n")
|
|
|
|
|
|
# 视频号爬虫报警
|
|
|
- elif crawler == "shipinhao" and (int(time.time()) - cls.get_first_time(log_type, crawler) > int(duration)):
|
|
|
- Feishu.bot(log_type, crawler, "视频号已下载表,超过24小时没有新视频入库了😤")
|
|
|
- Common.logger(log_type).warning("视频号已下载表,超过24小时没有新视频入库了😤\n")
|
|
|
+ elif crawler == "shipinhao_recommend" and (int(time.time()) - cls.get_first_time(log_type, crawler) > int(duration)):
|
|
|
+ Feishu.bot(log_type, crawler, "视频号_推荐_已下载表,超过24小时没有新视频入库了😤")
|
|
|
+ Common.logger(log_type).warning("视频号_推荐_已下载表,超过24小时没有新视频入库了😤\n")
|
|
|
+ elif crawler == "shipinhao_follow" and (int(time.time()) - cls.get_first_time(log_type, crawler) > int(duration)):
|
|
|
+ Feishu.bot(log_type, crawler, "视频号_定向_已下载表,超过24小时没有新视频入库了😤")
|
|
|
+ Common.logger(log_type).warning("视频号_定向_已下载表,超过24小时没有新视频入库了😤\n")
|
|
|
|
|
|
# 宗教公众号爬虫报警
|
|
|
elif crawler == "zongjiao" and (int(time.time()) - cls.get_first_time(log_type, crawler) > int(duration)):
|
|
@@ -343,7 +351,8 @@ class Bot:
|
|
|
Bot.robot_download_sheet("bot", "weishi", duration)
|
|
|
|
|
|
Common.logger("bot").info("监控视频号已下载表")
|
|
|
- Bot.robot_download_sheet("bot", "shipinhao", duration)
|
|
|
+ # Bot.robot_download_sheet("bot", "shipinhao_recommend", duration)
|
|
|
+ Bot.robot_download_sheet("bot", "shipinhao_follow", duration)
|
|
|
|
|
|
Common.logger("bot").info("监控宗教公众号已下载表")
|
|
|
Bot.robot_download_sheet("bot", "zongjiao", duration)
|
|
@@ -366,7 +375,7 @@ class Bot:
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
|
- # Bot.robot_download_sheet("bot", "haokan_channel", 1)
|
|
|
+ # Bot.robot_download_sheet("bot", "shipinhao_follow", 1)
|
|
|
Bot.main()
|
|
|
|
|
|
pass
|