|
@@ -132,6 +132,12 @@ 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 == "zongjiao":
|
|
|
+ sheet = Feishu.get_values_batch(log_type, "zongjiao", "xf9wC2")
|
|
|
+ # 已下载表,最新一条视频抓取时间
|
|
|
+ first_download_time = sheet[1][5]
|
|
|
+ first_download_time = int(time.mktime(time.strptime(first_download_time, "%Y/%m/%d %H:%M:%S")))
|
|
|
+
|
|
|
else:
|
|
|
sheet = Feishu.get_values_batch(log_type, "xiaoniangao", "yatRv2")
|
|
|
# 已下载表,最新一条视频抓取时间
|
|
@@ -253,6 +259,11 @@ class Bot:
|
|
|
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)):
|
|
|
+ Feishu.bot(log_type, crawler, "宗教公众号已下载表,超过24小时没有新视频入库了😤")
|
|
|
+ Common.logger(log_type).warning("宗教公众号已下载表,超过24小时没有新视频入库了😤\n")
|
|
|
+
|
|
|
except Exception as e:
|
|
|
Common.logger(log_type).error(f"robot_alarm异常:{e}\n")
|
|
|
|
|
@@ -309,6 +320,9 @@ class Bot:
|
|
|
Common.logger("bot").info("监控视频号已下载表")
|
|
|
Bot.robot_download_sheet("bot", "shipinhao", duration)
|
|
|
|
|
|
+ Common.logger("bot").info("监控宗教公众号已下载表")
|
|
|
+ Bot.robot_download_sheet("bot", "zongjiao", duration)
|
|
|
+
|
|
|
# Common.logger("bot").info("监控公众号已下载表")
|
|
|
# Bot.robot_download_sheet("bot", "gzh", duration)
|
|
|
|
|
@@ -327,7 +341,7 @@ class Bot:
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
|
- # Bot.robot_download_sheet("bot", "zhufumao", 1)
|
|
|
+ # Bot.robot_download_sheet("bot", "zongjiao", 1)
|
|
|
Bot.main()
|
|
|
|
|
|
pass
|