Explorar el Código

抓取流程增加 piaoquan 平台

luojunhui hace 2 semanas
padre
commit
b65399dba8
Se han modificado 1 ficheros con 26 adiciones y 0 borrados
  1. 26 0
      schedule_app.py

+ 26 - 0
schedule_app.py

@@ -0,0 +1,26 @@
+# from celery import Celery
+from tasks.crawler_tasks.crawler_video.crawler_piaoquan_videos import CrawlerPiaoQuanVideos
+from tasks.crawler_tasks.crawler_video.crawler_sohu_videos import CrawlerSohuHotVideos
+from tasks.crawler_tasks.crawler_video.crawler_sohu_videos import CrawlerSohuRecommendVideos
+
+
+# app = Celery('tasks', broker='redis://localhost:6379/0')
+
+# @app.task
+def run_piaoquan_video_crawler():
+    crawler = CrawlerPiaoQuanVideos()
+    crawler.deal()
+
+def run_sohu_video_crawler():
+    # step1, crawl sohu hot videos
+    crawler_sohu_hot_videos = CrawlerSohuHotVideos()
+    crawler_sohu_hot_videos.deal()
+
+    # step2, crawl sohu recommend videos
+    crawler_sohu_recommend_videos = CrawlerSohuRecommendVideos()
+    crawler_sohu_recommend_videos.deal()
+
+if __name__ == "__main__":
+    run_piaoquan_video_crawler()
+    run_sohu_video_crawler()
+