scrapy-rotating-proxies:与Scrapy一起使用多个代理

时间:2021-05-06 17:04:44
【文件属性】:
文件名称:scrapy-rotating-proxies:与Scrapy一起使用多个代理
文件大小:16KB
文件格式:ZIP
更新时间:2021-05-06 17:04:44
proxy scrapy Python 刮擦旋转代理 该软件包提供了一个中间件来使用旋转代理,检查它们是否还活着并调整爬网速度。 许可证是麻省理工学院。 安装 pip install scrapy-rotating-proxies 用法 将带有代理列表的ROTATING_PROXY_LIST选项添加到settings.py: ROTATING_PROXY_LIST = [ 'proxy1.com:8000', 'proxy2.com:8031', # ... ] 或者,您可以指定一个ROTATING_PROXY_LIST_PATH选项,以及一个带有代理的文件的路径,每行一个: ROTATING_PROXY_LIST_PATH = '/my/path/proxies.txt' 如果同时存在两个选项,则ROTATING_PROXY_LIST_PATH优先于ROTATING_PROXY_LIST 。
【文件预览】:
scrapy-rotating-proxies-master
----setup.py(2KB)
----.gitignore(133B)
----codecov.yml(80B)
----CHANGES.rst(2KB)
----.travis.yml(320B)
----MANIFEST.in(28B)
----setup.cfg(135B)
----LICENSE.txt(1KB)
----README.rst(7KB)
----tests()
--------test_expire.py(2KB)
--------test_policy.py(1KB)
----.coveragerc(20B)
----rotating_proxies()
--------middlewares.py(12KB)
--------__init__.py(46B)
--------utils.py(751B)
--------expire.py(5KB)
--------policy.py(584B)
----tox.ini(408B)

网友评论