Saravanan666/pypi-org huggingface dataset:
Package: proxtor
ProxtorProxtor is a Python library that allows you to send HTTP requests over the TOR network.
It simplifies interacting with TOR and helps with IP renewal, sending GET/POST requests, and more.InstallationProxtor can be installed using pip:pipinstallProxtorRequirementsProxtor requires Tor to be installed on your machine and running.
It also assumes that the Tor control port is set to 9051 and that the password is set to 'your_password'
(the password and port can be changed when initializing Proxtor).The package as been written in python3.11 but should work with any version of python 3.7+.A Docker image is availablehere.If you want to do something more custom, an example Dockerfile is available in the repository.UsageInitializationProxtor is very easy to use. Here is an example of how to use it:fromProxtorimportTortor=Tor(tor_password='your_password',tor_port=9051)# Get requestresponse=tor.get_request(url='https://example.com',headers={'User-Agent':'Mozilla/5.0'})print(response.content)# Post requestresponse=tor.post_request(url='https://example.com',headers={'User-Agent':'Mozilla/5.0'},data={'key':'value'})print(response.content)# Get the current IP# Tor ipprint(tor.get_ip())# Local machine ipprint(tor.get_ip(show_tor_ip=False))# Get a new IP (won't work 100% of the time as it depends on the exit node)tor.get_new_ip(max_retries=5)LoggingLogging is enabled by default, with the log level set to INFO.
You will find logs for key events such as TOR IP renewal failures.ContributingContributions are very welcome.
Please submit a pull request or create an issue for any enhancements, bugs or feature requests.LicenseThis project is licensed under the MIT license. See theLICENSEfile for details.
Package: prox_tv
proxTV is a toolbox implementing blazing fast implementations of Total Variation
proximity operators. While the core algorithms are implemented in C to achieve high
efficiency, Matlab and Python interfaces are provided for ease of use. The library
provides efficient solvers for a variety of Total Variation proximity problems, with
address input signals of any dimensionality (1d, images, video, …) and different
norms to apply in the Total Variation term.
Package: prox-tv-SDIST
FORK BY WSDEWITT FOR SDIST DEPLOYMENTproxTV is a toolbox implementing blazing fast implementations of Total Variation
proximity operators. While the core algorithms are implemented in C to achieve high
efficiency, Matlab and Python interfaces are provided for ease of use. The library
provides efficient solvers for a variety of Total Variation proximity problems, with
address input signals of any dimensionality (1d, images, video, …) and different
norms to apply in the Total Variation term.
Package: proxy3
proxy3Man-in-the-middle http/https proxy in a single python scriptFeatureseasy to customizerequire no external modulessupport both of IPv4 and IPv6support HTTP/1.1 Persistent Connectionsupport dynamic certificate generation for HTTPS interceptThis script works on Python 3.10+.
You need to installopensslto intercept HTTPS connections.UsageJust clone and run as a script:$ python proxy3.pyOr, install using pip:$ pip install proxy3
$ proxy3Above command runs the proxy on localhost:7777. Verify it works by typing the below
command in another terminal of the same host.# test http proxy
$ http_proxy=localhost:7777 curl http://www.example.com/To bind to another host or port:$ python proxy3.py --host 0.0.0.0 --port 3128Enable HTTPS interceptTo intercept HTTPS connections, generate private keys and a private CA certificate:$ python proxy3.py --make-certs
$ https_proxy=localhost:7777 curl https://www.example.com/Through the proxy, you can accesshttp://proxy3.test/and install the CA certificate in the browsers.Detailed Usage$ python proxy3.py --help

usage: proxy3.py [-h] [-H HOST] [-p PORT] [--timeout TIMEOUT] [--ca-key CA_KEY] [--c
a-cert CA_CERT] [--ca-signing-key CA_SIGNING_KEY] [--cert-dir CERT_DIR] [--request-h
andler REQUEST_HANDLER] [--response-handler RESPONSE_HANDLER] [--save-handler SAVE_H
ANDLER] [--make-certs]

options:
  -h, --help            show this help message and exit
  -H HOST, --host HOST  Host to bind (default: localhost)
  -p PORT, --port PORT  Port to bind (default: 7777)
  --timeout TIMEOUT     Timeout (default: 5)
  --ca-key CA_KEY       CA key file (default: ./ca-key.pem)
  --ca-cert CA_CERT     CA cert file (default: ./ca-cert.pem)
  --ca-signing-key CA_SIGNING_KEY
                        CA cert key file (default: ./ca-signing-key.pem)
  --cert-dir CERT_DIR   Site certs files (default: ./certs)
  --request-handler REQUEST_HANDLER
                        Request handler function (default: None)
  --response-handler RESPONSE_HANDLER
                        Response handler function (default: None)
  --save-handler SAVE_HANDLER
                        Save handler function, use 'off' to turn off (default: None)CustomizationYou can easily customize the proxy and modify the requests/responses or save something to the files.
The ProxyRequestHandler class has 3 methods to customize:request_handler: called before accessing the upstream serverresponse_handler: called before responding to the clientsave_handler: called after responding to the client with the exclusive lock, so you can safely write out to the terminal or the file systemBy default, only save_handler is implemented which outputs HTTP(S) headers and some useful data to the standard output.
Package: proxy-6
# Proxy6 API [Python]Python API РґР»СЏ [СЃРµСЂРІРёСЃР° РїСЂРѕРєСЃРё](https://proxy6.net).РўСЂРµР±СѓРµС‚СЃСЏ С‚РµСЃС‚РёСЂРѕРІР°РЅРёРµ Р±РёР±Р»РёРѕС‚РµРєРё, РїРёСЃР°С‚СЊ [СЃСЋРґР°](https://linkedin.com/in/vbxx3).РћСЂРёРіРёРЅР°Р»СЊРЅС‹Р№ [REST](https://proxy6.net/developers).***### РЈСЃС‚Р°РЅРѕРІРєР°:pip install proxy-6***### Р”РѕРєСѓРјРµРЅС‚Р°С†РёСЏ:* РђРІС‚РѕСЂРёР·Р°С†РёСЏ РєР»РёРµРЅС‚Р°```pythonproxy = Proxy(api_key)  # str: api_key```РњРµС‚РѕРґ             | РћРїРёСЃР°РЅРёРµ------------------|----------------------balance()         | Р’РѕР·РІСЂР°С‰Р°РµС‚ Р±Р°Р»Р°РЅСЃ Р°РєРєР°СѓРЅС‚Р°get_price(count, period, version=None)| Р’РѕР·РІСЂР°С‰Р°РµС‚ СЃС‚РѕРёРјРѕСЃС‚СЊ count(**int**) РїСЂРѕРєСЃРё, РЅР° РїРµСЂРёРѕРґ period(**int**), СЃ version(3, 4, 6 **int**) ipv4 shared, ipv4, ipv6 СЃРѕРѕС‚РІРµС‚СЃС‚РІРµРЅРЅРѕ, Р±РµР· - ipv6get_count(country, version=None)| Р’РѕР·РІСЂР°С‰Р°РµС‚ РєРѕР»-РІРѕ РІРѕР·РјРѕР¶РЅС‹С… РґР»СЏ РїРѕРєСѓРїРєРё РїСЂРѕРєСЃРё РІ СЃС‚СЂР°РЅРµ country(**str** РІ С„РѕСЂРјР°С‚Рµ iso2), СЃ version(3, 4, 6 **int**) ipv4 shared, ipv4, ipv6 СЃРѕРѕС‚РІРµС‚СЃС‚РІРµРЅРЅРѕ, Р±РµР· - ipv6get_country(version=None)| Р’РѕР·РІСЂР°С‰Р°РµС‚ СЃРїРёСЃРѕРє РІРѕР·РјРѕР¶РЅС‹С… РґР»СЏ РїРѕРєСѓРїРєРё РїСЂРѕРєСЃРё СЃС‚СЂР°РЅ, СЃ version(3, 4, 6 **int**) ipv4 shared, ipv4, ipv6 СЃРѕРѕС‚РІРµС‚СЃС‚РІРµРЅРЅРѕ, Р±РµР· - ipv6get_proxy(state=None, descr='', nokey=False| Р’РѕР·РІСЂР°С‰Р°РµС‚ РєСѓРїР»РµРЅРЅС‹Рµ РїСЂРѕРєСЃРё, СЃ state(**str** active/expired/expiring), Р±РµР· - all, СЃ descr(**str** С‚РµС…. РєРјРѕРјРјРµРЅС‚Р°СЂРёР№), Р±РµР· РІСЃРµ, СЃ nokey(**bool**) - РІРѕР·РІСЂР°С‰Р°РµС‚ Р±РµР· РєР»СЋС‡РµР№set_type(ids, types)| РњРµРЅСЏРµС‚ С‚РёРї РєСѓРїР»РµРЅРЅРѕРіРѕ РїСЂРѕРєСЃРё, ids(**str**) id С‡РµСЂРµР· Р·Р°РїСЏС‚СѓСЋ, types(**str** http/socks)set_descr(new, olds=None, ids=None)| РњРµРЅСЏРµС‚ РѕРїРёСЃР°РЅРёРµ СЃ (**str**) old РёР»Рё Сѓ ids(**str**) id С‡РµСЂРµР· Р·Р°РїСЏС‚СѓСЋ, РЅР° new (**str**)buy(count, period, country, version=None, types=None, descr='', auto_prolong=False, nokey=False)| РџРѕРєСѓРїР°РµС‚ count(**int**) РїСЂРѕРєСЃРё, РЅР° period(**int**) РґРЅРµР№, country(**str** iso2), c auto_prolong(**bool**) Р°РІС‚РѕРїСЂРѕРґР»РµРЅРёРµРјprolong(period, ids, nokey=False)| РџСЂРѕРґР»СЏРµС‚ СЃ ids(**str**) РЅР° period(**int**) РґРЅРµР№delete(ids=None, descr=None)| РЈРґР°Р»СЏРµС‚ РїСЂРѕРєСЃРё СЃ ids(**str**), Р»РёР±Рѕ СЃ descr(**str**)check(ids)| РџСЂРѕРІРµСЂСЏРµС‚ СЂР°Р±РѕС‚РѕСЃРїРѕСЃРѕР±РЅРѕСЃС‚СЊ Сѓ РїСЂРѕРєСЃРё СЃ ids(**str**)### РџСЂРёРјРµСЂ:РџРѕРєСѓРїРєР° 5 ipv6 РїСЂРѕРєСЃРё:```pythonproxy = Proxy6('2d08p37k6bkwjpj1pqgwdsbg9nuy2g1y')print(proxy.balance())print(proxy.buy(5, 3, 'ru', version=6, types='http', descr='TEST PROXY', auto_prolong=False, nokey=True))```
Package: proxy6api
Proxy6APIThis is unofficial software for using API onproxy 6.netInstallation:pip install proxy6apiUsageAfter registration onproxy 6.netget API_KEY onthis page.Import and usage methods:import osfrom proxy6api import Proxy_6_Client
API_KEY = os.getenv("PROXY_6_API_KEY")
client = Proxy_6_Client(api_key=API_KEY)
client.get_proxy()response:ProxyInfo(status='yes', user_id=111, balance=16.88, currency='RUB', list_count=4, date_mod=datetime.datetime(2023, 4, 9, 19, 12, 20), proxies_list=[ProxyItemInfo(id=71087, ip='2a06:c006:e8e0:a6b4:9e4c:05d2:2fa1:afc5', host='11.229.63.40', port='10409', user='oz295', password='tjQpP6', proxy_type='http', country='ru', date=datetime.datetime(2023, 4, 9, 19, 10, 51), date_end=datetime.datetime(2023, 4, 10, 19, 10, 51), unixtime=1681056651, unixtime_end=1681143051, descr='', active=True), ProxyItemInfo(id=2182, ip='2a06:c006:2bd8:3f81:d1ce:7354:4442:98db', host='217.209.683.40', port='1035', user='tpeS', password='b2S0f', proxy_type='socks', country='ru', date=datetime.datetime(2023, 4, 9, 18, 25, 20), date_end=datetime.datetime(2023, 4, 10, 18, 25, 20), unixtime=1681053920, unixtime_end=1681140320, descr='test', active=True), ProxyItemInfo(id=2181, ip='2a06:c006:17df:0ee1:43a3:2679:b194:6ad5', host='2137.29.623.40', port='10498', user='PtsxYC', password='KCsduj', proxy_type='http', country='ru', date=datetime.datetime(2023, 4, 9, 19, 9, 6), date_end=datetime.datetime(2023, 4, 10, 19, 9, 6), unixtime=1681056546, unixtime_end=1681142946, descr='', active=True), ProxyItemInfo(id=2112091, ip='2a06:c006:524f:862d:b3bc:e923:e995:de4b', host='217.239.63.430', port='10400', user='TsdEV', password='kK325q', proxy_type='http', country='ru', date=datetime.datetime(2023, 4, 9, 19, 12, 20), date_end=datetime.datetime(2023, 4, 10, 19, 12, 20), unixtime=1681056740, unixtime_end=1681143140, descr='', active=True)], page=1)error example:ErrorInfo(error_id=100, error='Error key - Ошибка авторизации, неверный ключ ')
Package: proxyarrays
FeaturesTODORequirementsTODOInstallationYou can installproxy StructureviapipfromPyPI:$pipinstallpython-proxyarraysUsagePlease see theCommand-line Referencefor details.ContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theMIT license,proxy Structureis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was generated from@cjolowicz’sHypermodern Python Cookiecuttertemplate.
Package: proxyauth
proxy auth for python appNote: this package is still in beta. Use with caution !QuickstartInstall proxyauth:pip install proxyauthUse proxy:app=Flask(__name__)app.config['SECRET_KEY']='helloworld'app.config['PERMANENT_SESSION_LIFETIME']=timedelta(days=7)# app.config['SESSION_COOKIE_HTTPONLY'] = True@proxy_all(app=app,auth_url='http://127.0.0.1:7000')defproxy(path):returnrequest.url.replace(':7001',':7002')@app.route('/error',methods=['GET'])defcookie():return'error'@app.route('/session',methods=['GET'])defsetup():returnsession_setup()if__name__=='__main__':app.run(port=7001)
Package: proxy-bouncer
Proxy BouncerProxies are scraped and saved fromhttps://free-proxy-list.netTo save a log of anonymous active proxies use the commandget_proxy(log=True)Used as a function in another program,get_proxy()will return a random it will a proxy oject as shown in the example below:`P = get_proxy()

print(P.ip_addr)        

'103.18.133.34'

print(P.port)

'21776'

print(P.code)

'ID'

print(P.country)

'Indonesia'

print(P.anon_level)

'elite proxy'

print(P.google)

'no'

print(P.https

'no'`
Package: proxyby41
proxyby41#proxyby41 advanced proxy scraper library for python3+#usage#For Http/Https Proxies
    scrape_proxy.http()

    #For Socks4 Proxies
    scrape_proxy.socks4()

    #For Socks5 Proxies
    scrape_proxy.socks5()

    #To Get All At A Time
    scrape_proxy.get_all()  [Note: All Are Saved In Different Files]  ```
Package: proxycalc
proxycalcdoes basic Mathematical operations on real numbers.InstallationpipinstallproxycalcUsageDefine new Calculator:>>>fromproxycalcimportCalculator>>>calculator=Calculator()>>>calculator.value0Find sum of 4 numbers:>>>fromproxycalcimportCalculator>>>calculator=Calculator()>>>calculator.add(2,5,3,4)>>>calculator.value14Subtract 2 numbers from the value:>>>calculator.subtract(5,3)>>>calculator.value6Multiply value by a number:>>>calculator.multiply_by(3)>>>calculator.value18Divide value by a number:>>>calculator.divide_by(2)>>>calculator.value9Find nth root of result:>>>calculator.find_root(2)>>>calculator.value3Reset calculator:>>>calculator.reset())>>>calculator.value0Development setup$python3-mvenvenv
$.env/bin/activate
$makedeps
$toxContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Make sure to add or update tests as appropriate.UseBlackfor code formatting andConventional Commitsfor commit messages.ChangelogLicenseMIT
Package: proxy-checker
Proxy Checker (Python)A proxy checker in Python using PycURL, a Python interface to libcurl.DescriptionThe proxy checker takes a proxy as input and uses it to send a request to a proxy judge (a website that outputs the information that was sent to it). If the request succeeds, the proxy checker will use the information it receives from the proxy judge to determine the proxy's:CountryProtocolAnonymitySpeedInstallationpip install proxy-checkerUsagefromproxy_checkerimportProxyCheckerchecker=ProxyChecker()checker.check_proxy('<ip>:<port>'){"country":"United States","country_code":"US","protocols":["socks4","socks5"],"anonymity":"Elite","timeout":1649}ParametersNameTypeDefaultDescriptionproxystrThe proxy to testcheck_countryboolTrueIftrue, the proxy's country will be looked upcheck_addressboolFalseIftrue, the proxy's remote address will looked upuserstrNoneThe proxy's usernamepasswordstrNoneThe proxy's passwordRequirementsPython 3.*PycURL- A Python interface to libcurl ** If you have trouble installing PycURL on Windows, try to use Christoph Gohlke's collection ofPython Extension Package for Windows.ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: proxy-checker-httpx
Proxy Checker (Python)A proxy checker in Python using Requests.DescriptionThe proxy checker takes a proxy as input and uses it to send a request to a proxy judge (a website that outputs the information that was sent to it). If the request succeeds, the proxy checker will use the information it receives from the proxy judge to determine the proxy's:CountryProtocolAnonymitySpeedInstallationpip install proxy-checker-httpxUsagefromproxy_checker_httpximportProxyCheckerimportasyncioasyncdefmain():checker=ProxyChecker()awaitchecker.initialize()awaitchecker.check_proxy('<ip>:<port>')returnasyncio.run(main()){"country":"United States","country_code":"US","protocols":["socks4","socks5"],"anonymity":"Elite","timeout":1649}ParametersNameTypeDefaultDescriptionproxystrThe proxy to testcheck_countryboolTrueIftrue, the proxy's country will be looked upcheck_addressboolFalseIftrue, the proxy's remote address will looked upuserstrNoneThe proxy's usernamepasswordstrNoneThe proxy's passwordRequirementsPython 3.*Httpx- A httpx python module *ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: proxy-checking
Proxy CheckerA checker designed in Python 3 for checking proxy.DescriptionThis script takes a proxy as string input and tries to get data such as:type (HTTP, SOCKS4, SOCKS5)time response (in seconds)anonymity (Anonymous or Transparent)countrycitycountry codeInstallationpip install proxy-checkingUsagefromproxy_checkingimportProxyCheckerchecker=ProxyChecker()checker.check_proxy('<ip>:<port>')if proxy is valid, will be return dictionary{"status":1,"type":["socks4","socks5"],"time_response":"0.545","anonymity":"Anonymous","country":"Germany","city":"Falkenstein","country_code":"DE"}if proxy is not valid{"status":0}LicenseMIT
Package: proxyctx
proxyctxProxyCTXis a handy utility library that empowers developers to establish a global context accessible from anywhere within their application. Its creation was inspired byFlask, a popular web framework. Under the hood,ProxyCTXleverages the Python standard modulecontextvars.The library consists of just two key components:Proxy: Inspired by Werkzeug'sLocalProxyclass (werkzeug.local)Context: Inspired by Flask'sAppContextclass (flask.ctx)Flask ExampleIn Flask, when defining a route, the corresponding method does not receive any parameters representing the incoming request. Instead, you can import a global variable calledrequest, which conveniently holds information about the incoming request. Here's an example code snippet illustrating this:fromflaskimportFlask,requestapp=Flask(__name__)@app.route("/")defindex():print(request.method)It's worth noting thatrequestis not the only global variable available in Flask. You can explore theflask.globalsmodule, which encompasses all the global variables provided by Flask.UsageTo install the library use the following command:pipinstallproxyctxProxyfromcontextvarsimportContextVarfromproxyctximportProxyclassGreet:def__init__(self,message:str=None):self.message=messagedefgreet(self,name:str):ifself.messageisNone:print(f"Hello{name}!")else:print(f"Hello{name},{self.message}")ctx:ContextVar["Greet"]=ContextVar("ctx")current_greet:"Greet"=Proxy(ctx)current_message:str=Proxy(ctx,lambdaobj:obj.message)ctx.set(Greet("how are you ?"))print(current_message)# "how are you ?"current_greet.greet("Lucino772")# "Hello Lucino772, how are you ?"ctx.set(Greet("have a nice day !"))print(current_message)# "have a nice day !"current_greet.greet("Lucino772")# "Hello Lucino772, have a nice day !"ContextfromcontextvarsimportContextVarfromproxyctximportProxy,Contextctx:ContextVar["GreetContext"]=ContextVar("ctx")current_greet:"Greet"=Proxy(ctx,lambdaobj:obj.greet)classGreet:def__init__(self,message:str=None):self.message=messagedefgreet(self,name:str):ifself.messageisNone:print(f"Hello{name}!")else:print(f"Hello{name},{self.message}")defgreet_context(self):returnGreetContext(self)classGreetContext(Context):def__init__(self,greet:"Greet"):super().__init__(ctx)self.greet=greetwithGreet("how are you ?").greet_context():current_greet.greet("Lucino772")# "Hello Lucino772, how are you ?"withGreet("have a nice day !").greet_context():current_greet.greet("Lucino772")# "Hello Lucino772, have a nice day !"current_greet.greet("Lucino772")# "Hello Lucino772, how are you ?"LicenceThis project uses aMITLicenceview
Package: proxydata-scrapy
proxydata-scrapyРасширение для проксирования запросов пауков scrapy через сервисproxyfordevelopers.comУстановкаУстановка с помощьюpippip install proxydata-scrapyЛибо скопируйте middleware классPFDDownloaderMiddlewareв файлmiddlewares.pyсвоего проектаДобавьте расширение в переменнуюDOWNLOADER_MIDDLEWARESвsettings.pyвашего проекта.
Так-же для корретной работы необходимо отключить middlewaresRobotsTxtMiddlewareиHttpCompressionMiddlewareДобавьте переменнуюPFD_TOKENвsettings.pyвашего проекта.
Для получения токена вам необходимо зарегистрироваться в сервисеproxyfordevelopersDOWNLOADER_MIDDLEWARES = {
    'scrapy.downloadermiddlewares.robotstxt.RobotsTxtMiddleware': None,
    'scrapy.downloadermiddlewares.httpcompression.HttpCompressionMiddleware': None,
    'proxydata_scrapy.middlewares.PFDDownloaderMiddleware': 800,
}

PFD_TOKEN = 'xyz'ИспользованиеПри необходимости передачи дополнительных параметров в APIproxyfordevelopers.comиспользуйте переменнуюcb_kwargsклассаscrapy.http.RequestНапример:class QuotesSpider(scrapy.Spider):
    name = "quotes"
    start_urls = [
        'http://quotes.toscrape.com/page/1/',
    ]

    def start_requests(self):
        cb_kwargs = {
            'proxy_type': 1,
            'js_enabled': True,
            'country': 'RU',
            'protocol': 1
        }
        for url in self.start_urls:
            yield Request(url, dont_filter=True, cb_kwargs=cb_kwargs)
Package: proxy-db
proxy-dbManage free and private proxies on local db for Python Projects. Each proxy has a score according to how it works.
Add a positive vote if the proxy works correctly and a negative vote if it does not work.importrequestsfromrequests.exceptionsimportTimeout,ConnectionError,ProxyErrorfromproxy_db.proxiesimportProxiesListproxy=next(ProxiesList())try:requests.get('http://site.com/',proxies=proxy)except(Timeout,ConnectionError,ProxyError):proxy.negative()else:proxy.positive()Proxy-db will return the best proxies first (more positive votes). You can alsofilter by country:fromproxy_db.proxiesimportProxiesListspain_proxy=next(ProxiesList('es'))# ...You can alsofilter by provider:fromproxy_db.proxiesimportProxiesListproxy_nova_proxy=next(ProxiesList(provider='Proxy Nova'))# ...Free proxies providers included:Proxy NovaNord VPN (requiresPROXYDB_NORDVPN_USERNAME&PROXYDB_NORDVPN_PASSWORDenv. variables).For more information seethe docs.InstallIf you havePip installed on your system, you can use it to install the latest ProxyDB stable version:$ pip3 install proxy-dbPython 2.7 & 3.4-3.7 are supported but Python 3.x is recommended. Usepip2on install for Python2.More info in the documentationSome providers do not have the correct country for proxies. To determine the correct country proxy-db can usegeoip.
To use this install the optional dependencies:$ pip3 install proxy-db[geoip]You also need a maxmind Geolite2 license (it’s free). To obtain the license, follow these steps:Sign up for a Maxmind Geolite2 accountLog in to your Maxmind accountIn the menu on the left, navigate toServices > My License Key.ClickGenerate new license key.Sets the environment variableMAXMIND_LICENSE_KEY. To set it from Python:import os
os.environ['MAXMIND_LICENSE_KEY'] = '28xjifHSTxVq93xZ'HTTPS & SOCKS5 proxiesTo usesocks5 proxieswith requests you need to install socks support:$ pip3 install proxy-db[socks]To useHTTPS proxieswith requests/urllib3 you need to install the latests urllib3 version from sources:$ pip install https://github.com/urllib3/urllib3/archive/master.zip
Package: proxy-decorator
proxy decoratorusagecreate ainifile or add to existinifileput this in yourinifile[http]http=http://your_proxy_server:your_proxy_porthttps=https://your_proxy_server:your_proxy_portusername=your_usernamepassword=your_passworduse it in your programfromproxy_decorator.proxy_decoratorimportproxy_httpconfig_file="path/to/proxy_config.ini"@proxy_http(config_file)defyour_function():# 您的函数实现pass