加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
run_crawler_nbd.py 820 Bytes
一键复制 编辑 原始数据 按行查看 历史
ramonli 提交于 2018-02-26 16:26 . Add files via upload
from Crawler.crawler_nbd import WebCrawlFromNBD
if __name__ == '__main__':
web_crawl_obj = WebCrawlFromNBD(2871,10,ThreadsNum=4,IP="localhost",PORT=27017,dbName='NBD_Stock',\
collectionName="nbd_news_company")
url_lst_withoutNews = web_crawl_obj.coroutine_run() #web_crawl_obj.single_run() #web_crawl_obj.multi_threads_run()
if url_lst_withoutNews != []:
print(' -------------------- Re-Crawl News List Pages -------------------- ')
url_lst_withoutArticles, title_lst_withoutArticles = web_crawl_obj.ReCrawlNews(url_lst_withoutNews)
if url_lst_withoutArticles != [] or title_lst_withoutArticles != []:
print(' -------------------- Re-Crawl Article Pages -------------------- ')
web_crawl_obj.ReCrawlArticles(url_lst_withoutArticles,title_lst_withoutArticles)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化