我想,如果有可能爬行https网页使用scrapy +爬虫。到目前为止,我使用的Python请求具有以下设置:
proxy_host = 'proxy.crawlera.com'
proxy_port = '8010'
proxy_auth = 'MY_KEY'
proxies = {
"https": "https://{}@{}:{}/".format(proxy_auth, proxy_host,
proxy_port),
"http": "http://{}@{}:{}/".format(proxy_auth, proxy_host, proxy_port)
}
ca_cert = 'crawlera-ca.crt'
res = requests.get(url='https://www.google.com/',
proxies=proxies,
verify=ca_cert
)我想通过Scrapy进入异步执行。我知道有scrapy-crawlera插件,但拿到证书后不知道怎么配置。此外,还有一件事困扰着我。Crawlera有不同的定价方案。最基本的是C10,它允许10个并发请求。什么意思?是否需要在settings.py中设置CONCURRENT_REQUESTS=10?
发布于 2019-01-11 23:34:30
scrapy-crawlera documentation中有一个Configuration部分,它应该可以解决您的大部分疑惑。
https://stackoverflow.com/questions/54047283
复制相似问题