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.1.tar.gz
(7.2 kB
view hashes)
Built Distribution
Close
Hashes for better_proxy-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ffd0ef296094e04be13514905b2be1b16faa7f19c842f144de92e16d55c35cb |
|
MD5 | b7096ec4d75626ff38eadf3a3d324fb0 |
|
BLAKE2b-256 | f927ff3793e96df0191ef34e01f6c2b189b13002d6843345553fc59caf61998d |