Better proxy!
Project description
Better Proxy
Представление такой сущности, как proxy в виде класса.
- Метод
Proxy.from_str()
поддерживает большинство форматом прокси (с протоколом и без):host:port:login:password host:port@login:password host:port|login:password login:password@host:port login:password:host:port host:port
- Реализованы методы
__hash__
и__eq__
, что позволяет засовывть прокси в set() - Метод
Proxy.from_file()
возвращает список прокси из файла по указанному пути
pip install better-proxy
More libraries of the family:
import aiohttp
from better_proxy import Proxy
from aiohttp_socks import ProxyConnector
async def fetch(url):
proxy = Proxy.from_str('socks5://user:password@127.0.0.1:1080')
connector = ProxyConnector.from_url(proxy.as_url)
async with aiohttp.ClientSession(connector=connector) as session:
async with session.get(url) as response:
return await response.text()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
better_proxy-1.1.2.tar.gz
(2.9 kB
view details)
Built Distribution
File details
Details for the file better_proxy-1.1.2.tar.gz
.
File metadata
- Download URL: better_proxy-1.1.2.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.1 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22548e886664f8b4ac4450eded9bd6adcba08ebdfbfc639c207bc295e11a0ac9 |
|
MD5 | d57b2a2ad72eaa3a099d53a62bc10998 |
|
BLAKE2b-256 | c1bc1cc37123c0af698eaf3867857dbd287abde35e59e0cf95014b38d0273c98 |
File details
Details for the file better_proxy-1.1.2-py3-none-any.whl
.
File metadata
- Download URL: better_proxy-1.1.2-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.1 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a9d8638fa15f226ef2875671d8a7fa5f68ac837c971258990f12d893ea7371c |
|
MD5 | d3343d182614ac7518a04c0c4d6f9d80 |
|
BLAKE2b-256 | 6c77a8d9ee23ae66ccb5cbeb67d7639dace7bdc0290a589a5d2e3c3004d22ea1 |