pgaref / HTTP_Request_Randomizer

Proxying Python Requests
http://pgaref.com/blog/python-proxy/
MIT License
148 stars 60 forks source link

Added setup.py so the project can be installed with pip. Fixed some issues. #16

Closed asmaier closed 8 years ago

asmaier commented 8 years ago

This pull request adds a setup.py file so one can install the project via pip. Just add

-e git+https://github.com/pgaref/HTTP_Request_Randomizer#egg=HTTP_Request_Randomizer

to your requirements.txt and the lastest version of the project gets installed. After installation one can the use package like

>>> import project.http.requests.proxy.requestProxy as rp
>>> proxy=rp.RequestProxy()
=== Initialized Proxy Parsers ===
     FreeProxy Parser of 'http://free-proxy-list.net' with required bandwidth: '150' KBs
     ProxyForEU Parser of 'http://proxyfor.eu/geo.php' with required bandwidth: '100.0' KBs
     RebroWeebly Parser of 'http://rebro.weebly.com/proxy-list.html' with required bandwidth: '150' KBs
     SemairProxy Parser of 'http://www.samair.ru/proxy/time-01.htm' with required bandwidth: '150' KBs
=================================
>>> proxy.generate_proxied_request("http://www.google.com")
Using proxy: http://162.144.111.48:80
<Response [200]>

In addition this pull request fixes issue #15 and improves the threadsafety.

pgaref commented 8 years ago

Great thanks!