|
@@ -65,6 +65,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 == "shipinhao":
|
|
|
+ sheet = Feishu.get_values_batch(log_type, "shipinhao", "c77cf9")
|
|
|
+ # print(sheet[1])
|
|
|
+ # 已下载表,最新一条视频抓取时间
|
|
|
+ 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")
|
|
|
# 已下载表,最新一条视频抓取时间
|
|
@@ -196,6 +202,11 @@ class Bot:
|
|
|
Feishu.bot(log_type, crawler, "微视已下载表,超过24小时没有新视频入库了😤")
|
|
|
Common.logger(log_type).info("微视已下载表,超过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).info("视频号已下载表,超过24小时没有新视频入库了😤\n")
|
|
|
+
|
|
|
except Exception as e:
|
|
|
Common.logger(log_type).error("robot_alarm异常:{}", e)
|
|
|
|
|
@@ -233,6 +244,9 @@ class Bot:
|
|
|
Common.logger("bot").info("监控音乐相册已下载表")
|
|
|
Bot.robot_download_sheet("bot", "music_album", duration)
|
|
|
|
|
|
+ Common.logger("bot").info("监控视频号已下载表")
|
|
|
+ Bot.robot_download_sheet("bot", "shipinhao", duration)
|
|
|
+
|
|
|
# Common.logger("bot").info("监控微群视频已下载表")
|
|
|
# Bot.robot_download_sheet("bot", "weiqun", duration)
|
|
|
|