wangkun 1 年之前
父節點
當前提交
1081569271
共有 2 個文件被更改,包括 16 次插入0 次删除
  1. 3 0
      douyin/douyin_recommend/__init__.py
  2. 13 0
      shipinhao/shipinhao_main/run_test.py

+ 3 - 0
douyin/douyin_recommend/__init__.py

@@ -1,9 +1,12 @@
 import execjs
 import os
 
+from common.common import Common
+
 
 def get_xb(f_url, ua):
     js_path = os.path.abspath(os.path.dirname(os.getcwd()))
+    Common.logger(log_type="recommend", crawler="douyin").info(f"js_path:{js_path}")
     # with open(f'{js_path}/xb.js', 'r', encoding='utf-8') as f:
     with open(f'{js_path}/piaoquan_crawler/douyin/xb.js', 'r', encoding='utf-8') as f:
         douyin_js = f.read()

+ 13 - 0
shipinhao/shipinhao_main/run_test.py

@@ -0,0 +1,13 @@
+# -*- coding: utf-8 -*-
+# @Author: wangkun
+# @Time: 2023/6/7
+from common.common import Common
+
+
+def test(log_type, crawler):
+    print("just test")
+    Common.logger(log_type, crawler).info("just test")
+
+
+if __name__ == "__main__":
+    test("test1", "test2")