Proxy Port integration with Scrapy framework
pypi.org/project/scrapyproxyport - page on PyPi.org
github.com/proxyport/scrapy-proxyport - source code on github
github.com/proxyport/scrapy-proxyport - source code on github
Prerequisites
Installation
$ pip install scrapyproxyport
Getting Started
Before you get your first proxy, you need to assign an API Key. This can be done either through an environment variable
$ export PROXY_PORT_API_KEY=<API_KEY>
or inside settings.py.
# inside <your_project>/settings.py
PROXY_PORT_API_KEY = '<API_KEY>'
DOWNLOADER_MIDDLEWARES = {
# Add middleware with order number right before CookiesMiddleware
'scrapyproxyport.middlewares.ProxyMiddleware': 898,
'scrapy.downloadermiddlewares.cookies.CookiesMiddleware': 899,
}
DOWNLOAD_TIMEOUT = 10
RETRY_TIMES = 20
DUPEFILTER_CLASS = 'scrapy.dupefilters.BaseDupeFilter'