|
@@ -183,6 +183,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 == "youtube":
|
|
|
+ sheet = Feishu.get_values_batch(log_type, "youtube", "GVxlYk")
|
|
|
+ # 已下载表,最新一条视频抓取时间
|
|
|
+ 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")
|
|
|
# 已下载表,最新一条视频抓取时间
|
|
@@ -350,6 +356,11 @@ class Bot:
|
|
|
Feishu.bot(log_type, crawler, "宗教公众号已下载表,超过24小时没有新视频入库了😤")
|
|
|
Common.logger(log_type).warning("宗教公众号已下载表,超过24小时没有新视频入库了😤\n")
|
|
|
|
|
|
+ # youtube
|
|
|
+ elif crawler == "youtube" and (int(time.time()) - cls.get_first_time(log_type, crawler) > int(duration)):
|
|
|
+ Feishu.bot(log_type, crawler, "youtube_定向_已下载表,超过24小时没有新视频入库了😤")
|
|
|
+ Common.logger(log_type).warning("youtube_定向_已下载表,超过24小时没有新视频入库了😤\n")
|
|
|
+
|
|
|
except Exception as e:
|
|
|
Common.logger(log_type).error(f"robot_alarm异常:{e}\n")
|
|
|
|
|
@@ -413,6 +424,9 @@ class Bot:
|
|
|
Common.logger("bot").info("刚刚都传已下载表")
|
|
|
Bot.robot_download_sheet("bot", "ggdc", duration)
|
|
|
|
|
|
+ Common.logger("bot").info("youtube_定向_已下载表")
|
|
|
+ Bot.robot_download_sheet("bot", "youtube", duration)
|
|
|
+
|
|
|
# Common.logger("bot").info("监控众妙音信已下载表")
|
|
|
# Bot.robot_download_sheet("bot", "zmyx", duration)
|
|
|
|
|
@@ -444,7 +458,7 @@ class Bot:
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
|
- # Bot.robot_download_sheet("bot", "gongzhonghao_xinxin", 1)
|
|
|
+ # Bot.robot_download_sheet("bot", "youtube", 1)
|
|
|
Bot.main()
|
|
|
|
|
|
pass
|