Przeglądaj źródła

抓取部分执行任务

luojunhui 4 miesięcy temu
rodzic
commit
d90151ae82
1 zmienionych plików z 6 dodań i 6 usunięć
  1. 6 6
      run_video_account_crawler.py

+ 6 - 6
run_video_account_crawler.py

@@ -20,36 +20,36 @@ def main():
     try:
         account_crawler.run()
     except Exception as e:
-        traceback.print_exc()
+        error_msg = traceback.format_exc()
         bot(
             title='账号抓取v1执行失败',
             detail={
                 "error": str(e),
-                "traceback": traceback.format_exc()
+                "traceback": error_msg
             }
         )
     # 再执行文章抓取
     try:
         video_crawler.run()
     except Exception as e:
-        traceback.print_exc()
+        error_msg = traceback.format_exc()
         bot(
             title='视频抓取执行失败',
             detail={
                 "error": str(e),
-                "traceback": traceback.format_exc()
+                "traceback": error_msg
             }
         )
     # 再执行账号抓取v2
     try:
         account_crawler.run_v2()
     except Exception as e:
-        traceback.print_exc()
+        error_msg = traceback.format_exc()
         bot(
             title='账号抓取V2执行失败',
             detail={
                 "error": str(e),
-                "traceback": traceback.format_exc()
+                "traceback": error_msg
             }
         )