A Library to easily load/fetch proxy servers.
Project description
ProxyCycle
Table of Contents
Installation
pip install proxycycle
Usage
### Initialize a proxy object
from proxycycle.Proxy import Proxy
from proxycycle.enums.scheme import Scheme
from proxycycle.enums.anonymity_level import AnonymityLevel
proxy1 = Proxy("127.0.0.1", 8080)
proxy2 = Proxy("127.0.0.1", 8080, Scheme.HTTP)
proxy3 = Proxy("127.0.0.1", 8080, anonymity_level=AnonymityLevel.Elite)
proxy4 = Proxy("127.0.0.1", 8080, Scheme.HTTP, AnonymityLevel.Elite)
proxy5 = Proxy.fromString("127.0.0.1:8080")
proxy6 = Proxy.fromString("http://127.0.0.1:8080")
### Initialize a proxyset
from proxycycle.ProxySet import ProxySet
ps1 = ProxySet([proxy2, proxy3, proxy4])
ps2 = ProxySet()
ps2.set_proxy(proxy1)
ps3 = ProxySet()
ps3.extend_with_proxysets(ps1, ps2)
with open('file.txt', 'r') as f:
ps4 = ProxySet.fromFile(f)
### Initialize a proxyset without pre-known proxies
from proxycycle.api.proxyscrape import ProxyScrape
ps5 = ProxyScrape.fetch_proxyset(50)
len(ps5) # less or equal to 50 ^^ (this 50)
License
proxycycle
is distributed under the terms of the MIT license.
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
proxycycle-1.1.2.tar.gz
(7.5 kB
view hashes)
Built Distribution
Close
Hashes for proxycycle-1.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efd5cdcaac6255fed4fe2c28e183f686887a161d2ff65c27b2bc45efef317b5b |
|
MD5 | d396806a714957faf90c75f7afc80acc |
|
BLAKE2b-256 | f6885c07b3e1dc3b800b39fe3d6d33ee4d7b12c7d47b3fa9854acd5548a87e53 |