|
@@ -10,6 +10,43 @@ from common.sql_help import sqlCollect
|
|
|
|
|
|
|
|
|
|
|
|
+def bot_bygj_data():
|
|
|
+ all_count = sqlCollect.get_bygj_all_count()
|
|
|
+ fj = sqlCollect.get_bygj_count("范军")
|
|
|
+ # ytd_lt = sqlCollect.get_ytd_bygj_count("范军")
|
|
|
+
|
|
|
+ lt = sqlCollect.get_bygj_count("鲁涛")
|
|
|
+ # ytd_lt = sqlCollect.get_ytd_bygj_count("鲁涛")
|
|
|
+
|
|
|
+ yht = sqlCollect.get_bygj_count("余海涛")
|
|
|
+ # ytd_yht = sqlCollect.get_ytd_bygj_count("余海涛")
|
|
|
+
|
|
|
+ lq = sqlCollect.get_bygj_count("罗情")
|
|
|
+ # ytd_lq = sqlCollect.get_ytd_bygj_count("罗情")
|
|
|
+
|
|
|
+ lsy = sqlCollect.get_bygj_count("刘诗雨")
|
|
|
+ # ytd_lsy = sqlCollect.get_ytd_bygj_count("刘诗雨")
|
|
|
+
|
|
|
+ zf = sqlCollect.get_bygj_count("张峰")
|
|
|
+ # ytd_zf = sqlCollect.get_ytd_bygj_count("张峰")
|
|
|
+
|
|
|
+ zxq = sqlCollect.get_bygj_count("周仙琴")
|
|
|
+ # ytd_zxq = sqlCollect.get_ytd_bygj_count("周仙琴")
|
|
|
+ text = (
|
|
|
+ f"**总条数: **{int(all_count[0][0])}**条**\n"
|
|
|
+ f"**范军: **{int(fj[0][0])}**条**\n"
|
|
|
+ f"**鲁涛: **{int(lt[0][0])}**条**\n"
|
|
|
+ f"**余海涛: **{int(yht[0][0])}**条**\n"
|
|
|
+ f"**罗情: **{int(lq[0][0])}**条**\n"
|
|
|
+ f"**刘诗雨: **{int(lsy[0][0])}**条**\n"
|
|
|
+ f"**张峰: **{int(zf[0][0])}**条**\n"
|
|
|
+ f"**周仙琴: **{int(zxq[0][0])}**条**\n"
|
|
|
+ )
|
|
|
+ Feishu.finish_bot(text,
|
|
|
+ "https://open.feishu.cn/open-apis/bot/v2/hook/1f3aa0e0-f872-4541-8fc7-6dcc825920ea",
|
|
|
+ f"【 搬运工具{datetime.now().strftime('%Y年%m月%d日 %H时')}之前的数据 】")
|
|
|
+
|
|
|
+
|
|
|
"""爬虫"""
|
|
|
def bot_crawler_data():
|
|
|
try:
|
|
@@ -120,10 +157,11 @@ def schedule_tasks():
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
+ bot_bygj_data()
|
|
|
# bot_crawler_data()
|
|
|
- schedule_tasks() # 调用任务调度函数
|
|
|
- while True:
|
|
|
- schedule.run_pending()
|
|
|
- time.sleep(1) # 每秒钟检查一次
|
|
|
+ # schedule_tasks() # 调用任务调度函数
|
|
|
+ # while True:
|
|
|
+ # schedule.run_pending()
|
|
|
+ # time.sleep(1) # 每秒钟检查一次
|
|
|
# bot_carry_data()
|
|
|
|