Better proxy!
Project description
Better Proxy
pip install better-proxy
import aiohttp
from better_proxy import Proxy
from aiohttp_socks import ProxyConnector
async def fetch(url):
proxy = Proxy('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-0.1.0.tar.gz
(6.8 kB
view hashes)
Built Distribution
Close
Hashes for better_proxy-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1372abe712b5068050f56076942b6ed35f5cb9be6e71f5e5eb1334b5fdaa742 |
|
MD5 | 6e8dea5bcb5310d4f0d8311aa665608b |
|
BLAKE2b-256 | f3a4851cc84e211c7131213b01b180de7638aaeabd4f211e65093ffee53f8c8c |