Open KRRT7 opened 8 months ago
@KevinRodriguez777 There is aiohttp_socks
as a workaround to this problem. But from what you've shown me, this is definitely something that either you or I should be bringing up with the developers of aiohttp I will look more into this a bit later when I have the time to.
import winloop
from aiohttp_socks import ProxyConnector
import aiohttp
import asyncio
async def make_request():
async with aiohttp.ClientSession(connector=ProxyConnector.from_url("http://ip:port")) as session:
async with session.get("https://www.google.com") as response:
print(response.status)
if __name__ == "__main__":
winloop.install()
asyncio.run(make_request())
here's what I was suggesting you do for now until I can figure out exactly as to why this warning appears.
using aiohttp with an http proxy with an https request shows an
path\to\venv\Lib\site-packages\aiohttp\connector.py:899: RuntimeWarning: An HTTPS request is being sent through an HTTPS proxy. This support for TLS in TLS is known to be disabled in the stdlib asyncio. This is why you'll probably see an error in the log below.
this warning only shows when i install the winloop event policyif i comment out the
![image](https://github.com/Vizonex/Winloop/assets/106575910/d3b5eb2d-2e84-4a12-a2fc-8a5cbbeb1ef9)
winloop.install()
then i don't get the error with the same code