|
@@ -133,11 +133,16 @@ class Bot:
|
|
|
first_download_time = sheet[1][4]
|
|
|
first_download_time = int(time.mktime(time.strptime(first_download_time, "%Y/%m/%d %H:%M:%S")))
|
|
|
|
|
|
- elif crawler == "kuaishou":
|
|
|
+ elif crawler == "kuaishou_recommend":
|
|
|
sheet = Feishu.get_values_batch(log_type, "kuaishou", "3cd128")
|
|
|
# 已下载表,最新一条视频抓取时间
|
|
|
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 == "kuaishou_follow":
|
|
|
+ sheet = Feishu.get_values_batch(log_type, "kuaishou", "fYdA8F")
|
|
|
+ # 已下载表,最新一条视频抓取时间
|
|
|
+ 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 == "gzh":
|
|
|
sheet = Feishu.get_values_batch(log_type, "gzh", "fCs3BT")
|
|
@@ -221,9 +226,12 @@ class Bot:
|
|
|
Common.logger(log_type).warning("本山祝福已下载表,超过24小时没有新视频入库了😤\n")
|
|
|
|
|
|
# 快手爬虫报警
|
|
|
- elif crawler == "kuaishou" 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 == "kuaishou_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 == "kuaishou_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 == "gzh" and (int(time.time()) - cls.get_first_time(log_type, crawler) > int(duration)):
|
|
@@ -276,7 +284,8 @@ class Bot:
|
|
|
Bot.robot_download_sheet("bot", "bszf", duration)
|
|
|
|
|
|
Common.logger("bot").info("监控快手已下载表")
|
|
|
- Bot.robot_download_sheet("bot", "kuaishou", duration)
|
|
|
+ Bot.robot_download_sheet("bot", "kuaishou_recommend", duration)
|
|
|
+ Bot.robot_download_sheet("bot", "kuaishou_follow", duration)
|
|
|
|
|
|
Common.logger("bot").info("监控微视已下载表")
|
|
|
Bot.robot_download_sheet("bot", "weishi", duration)
|
|
@@ -301,7 +310,8 @@ class Bot:
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
- # Bot.robot_download_sheet("bot", "xigua_video", 1)
|
|
|
+ # Bot.robot_download_sheet("bot", "kuaishou_recommend", 1)
|
|
|
+ # Bot.robot_download_sheet("bot", "kuaishou_follow", 1)
|
|
|
Bot.main()
|
|
|
|
|
|
pass
|