A proxy library for python 3
Project description
Python proxy manager. <br>
Please use diligently and respectfully. <br>
Always respect a website's ROBOTS.txt
## compatibility
This library is compatible with python 3
## dependancies
This library is dependant on:
- requests
- beautifulsoup4
## install
```bash
pip install py_proxy
```
## features
- Automatically fetches up to 80 proxies
- Cycle between proxies easily
- Test a proxy and get details about the proxy
- Format proxies for use with requests library
## examples
```python
from proxy import Proxy
proxy = Proxy()
# getting the current proxy
cur_proxy = proxy.proxy
# testing the current proxy
res = proxy.test_proxy(cur_proxy)
if res == 1:
print("success!")
else:
print("failure!")
# cycling the proxy to a new proxy from the pool
proxy.cycle()
# filtering proxies by a country code
proxy = Proxy("US") #gets US only proxies from the pool
#format a proxy for use with requests library
ip = "100.100.100.100" #example ip, not real
port = "1989" #example port, not real
addr = [ip, port]
proxies = proxy.format_proxy(addr) #returns the requests proxies dictionary
```
## license
You're free to use this package which is licensed under the [MIT-LICENSE](LICENSE)
## contributing
Contribution is always appreciated. <br>
If you are contributing please remember to update the README. <br>
If your contribution is accepted you will be credited for it.
## Author
[Dylan Randall aka HOWZ1T](https://github.com/howz1t)
Keywords: proxy proxies library helper
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Library
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Please use diligently and respectfully. <br>
Always respect a website's ROBOTS.txt
## compatibility
This library is compatible with python 3
## dependancies
This library is dependant on:
- requests
- beautifulsoup4
## install
```bash
pip install py_proxy
```
## features
- Automatically fetches up to 80 proxies
- Cycle between proxies easily
- Test a proxy and get details about the proxy
- Format proxies for use with requests library
## examples
```python
from proxy import Proxy
proxy = Proxy()
# getting the current proxy
cur_proxy = proxy.proxy
# testing the current proxy
res = proxy.test_proxy(cur_proxy)
if res == 1:
print("success!")
else:
print("failure!")
# cycling the proxy to a new proxy from the pool
proxy.cycle()
# filtering proxies by a country code
proxy = Proxy("US") #gets US only proxies from the pool
#format a proxy for use with requests library
ip = "100.100.100.100" #example ip, not real
port = "1989" #example port, not real
addr = [ip, port]
proxies = proxy.format_proxy(addr) #returns the requests proxies dictionary
```
## license
You're free to use this package which is licensed under the [MIT-LICENSE](LICENSE)
## contributing
Contribution is always appreciated. <br>
If you are contributing please remember to update the README. <br>
If your contribution is accepted you will be credited for it.
## Author
[Dylan Randall aka HOWZ1T](https://github.com/howz1t)
Keywords: proxy proxies library helper
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Library
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py_proxy-0.2.1.tar.gz
(6.7 kB
view hashes)