Proxy your spider and crawl the galaxy.
Getting banned by websites can be really annoying. Given that the free proxy ips available on the Interent are generally hard to use. This project aims to provide a library with which spider programmers can easily fake the ip of their spider.
ProxyYourSpider collets proxies from http://proxydb.net/?protocol=http&protocol=https&anonlvl=4. The number of proxies colleted will be determined by the argument user input when launching run.py. All the proxies which are non-anonymous or have a timeout more than 2 seconds will be kicked out.
run.py keeps alive and updates the proxy pool when the available proxies are less than the given threshold which dramatically enhances the stability of proxy pool.
To get a proxy, just call method fetchProxy and provide a proxy type and you will get a decent proxy which has been verified before sending to you:)
Generally, you only need to call fetchProxy method to fet a proxy you desire.
However, you should bear in mind that run.py should be executed first and keep alive while using ProxyYourSpider.
Just execute run.py like:
$ python run.py 20
here 20 is the number of proxies you need.
Another thing worth mention is that run.py should be KEEP ALIVE while using ProxyYourSpide. It will continuously check whether the available proxies in your proxies pool is sufficient.
Notice: You also need to keep Redis alive since it is our database on which we store our proxies.
- Python 2.7
- Works on Linux, Mac OSX, Windows, BSD
$ git clone https://github.com/Rafael-Cheng/ProxyYourSpider.git
or just download zip.
$ pip install ProxyYourSpider
The license of this project is GPL license.