學習資料
書籍: Python爬蟲開發(fā)與項目實戰(zhàn)
該書作者博客:http://www.reibang.com/u/c6176c13bf98
并發(fā)
CONCURRENT_REQUESTS與DOWNLOAD_DELAY的關(guān)系
DOWNLOAD_DELAY 的設(shè)置優(yōu)先于CONCURRENT_REQUESTS,在設(shè)置了DOWNLOAD_DELAY 的情況下,即使設(shè)置了并發(fā),也會串行執(zhí)行,沒有了并發(fā).
見scrapy中CONCURRENT_REQUESTS與DOWNLOAD_DELAY的聯(lián)系
反反爬蟲策略
見Scrapy研究探索(七)——如何防止被ban之策略大集合
禁止cookies
user agent池
代理ip池
制作思路: https://www.zhihu.com/question/47464143
開源庫:
https://github.com/qiyeboy/IPProxyPool
https://github.com/jhao104/proxy_pool
https://github.com/WiseDoge/ProxyPool分布式爬取
增量爬取
https://www.zhihu.com/question/19793879
效率提升
https://segmentfault.com/a/1190000009321902
數(shù)據(jù)存mongodb
mongodb 安裝(windows)
http://www.cnblogs.com/lzrabbit/p/3682510.html
注意,最后安裝為服務(wù)后,要自己去系統(tǒng)中開啟服務(wù).以后重啟電腦它能自動開啟.