Browse Source

Merge branch 'zhangyongbak' of Server/piaoquan_crawler into master

zhangyong 1 year ago
parent
commit
4d0921059c
2 changed files with 22 additions and 5 deletions
  1. 0 5
      main/process_mq.sh
  2. 22 0
      zhufushenghuo/zhufushenghuo_main/run_zfsh_recommend_dev.py

+ 0 - 5
main/process_mq.sh

@@ -45,11 +45,6 @@ elif [ ${crawler} = "xg" ] && [ ${log_type} = "recommend" ];then
   profile_path=/.base_profile
   python=python3
   log_path=${piaoquan_crawler_dir}main/main_logs/process-mq-$(date +%Y-%m-%d).log
-elif [ ${crawler} = "zfsh" ] && [ ${log_type} = "recommend" ];then
-  piaoquan_crawler_dir=/Users/kanyikan/Desktop/crawler/piaoquan_crawler/
-  profile_path=/.base_profile
-  python=python3
-  log_path=${piaoquan_crawler_dir}main/main_logs/process-mq-$(date +%Y-%m-%d).log
 
 else
   piaoquan_crawler_dir=/root/piaoquan_crawler/

+ 22 - 0
zhufushenghuo/zhufushenghuo_main/run_zfsh_recommend_dev.py

@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+
+import os
+import sys
+
+from zhufushenghuo.zhufushenghuo_recommend.zfsh_recommend import ZfshRecommend
+
+sys.path.append(os.getcwd())
+from common.common import Common
+
+
+def kanyikan_main(log_type, crawler, env):
+    Common.logger(log_type, crawler).info(f'开始抓取:看一看推荐\n')
+    ZfshRecommend.get_videoList(log_type=log_type,
+                                    crawler=crawler,
+                                    rule_dict={},
+                                    our_uid=6267140,
+                                    env=env)
+
+
+if __name__ == "__main__":
+    kanyikan_main(log_type="recommend", crawler="zhufushenghuo", env="dev")