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.0.0.tar.gz
(2.8 kB
view details)
Built Distribution
File details
Details for the file better_proxy-1.0.0.tar.gz
.
File metadata
- Download URL: better_proxy-1.0.0.tar.gz
- Upload date:
- Size: 2.8 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 | 2e4a75a1ad4fd9cec7396f723ed06c61aa01f806765c64f639ef701ba79b538d |
|
MD5 | 48bea71141ae9f5a7df3c6d61773b1c9 |
|
BLAKE2b-256 | 0aed6fc34375d5fb61852ec1d5f6f4817369fe5a1d4ebfd437c5195d0696de57 |
File details
Details for the file better_proxy-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: better_proxy-1.0.0-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 | 8adca10dfa0b73712cd6cb6d8ff034b67c3c416bbb02c254542bb73af162bf39 |
|
MD5 | f6fded31545aa5d9fa284c66fe40b497 |
|
BLAKE2b-256 | 02494a99e8983eacae4f1d1bebba8626ff254f474752a69dd244c3482d948cae |