Browse Source

爬虫启动文件

dongzhaorui 3 years ago
parent
commit
357872af33
1 changed files with 17 additions and 0 deletions
  1. 17 0
      find_source/build_spider.py

+ 17 - 0
find_source/build_spider.py

@@ -0,0 +1,17 @@
+
+from crawler import BreadthCrawler
+from crawler.search_engine import BingSearchEngine
+
+
+def main():
+    engines = [
+        BingSearchEngine()
+    ]
+    BreadthCrawler(
+        allow_load_filter=False,
+        workers=2,
+    ).set_search_engines(engines).start()
+
+
+if __name__ == '__main__':
+    main()