130600
This commit is contained in:
14
testproxy.py
Normal file
14
testproxy.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import aiohttp
|
||||
import asyncio
|
||||
|
||||
async def fetch(session, url):
|
||||
proxy_auth = aiohttp.BasicAuth('bots_man', 'Ax123456')
|
||||
async with session.get(url, proxy='http://185.250.148.233:8899', proxy_auth=proxy_auth) as response:
|
||||
return await response.text()
|
||||
|
||||
async def main():
|
||||
async with aiohttp.ClientSession() as session:
|
||||
html = await fetch(session, 'http://example.com')
|
||||
print(html)
|
||||
|
||||
asyncio.run(main())
|
||||
Reference in New Issue
Block a user