You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
async def run(self, proxy):
proxy_for_requests = {'https': proxy}
try:
async with aiohttp.ClientSession() as session:
async with session.get(url='https://www.google.com', proxy=proxy_for_requests,
timeout=5, headers=self.get_headers()) as resp:
return proxy
except Exception as e:
print(str(e))
return None
Expected:
When it's a timeout problem, it returns None.
Actual:
this function always raises the error: "Constructor parameter should be str". I removed the option timeout and headers, but it still the same case. Only when I left the only option url, it can run correctly.
It seems the options for this session.get are not available.
my aiohttp is 3.4.4 and my OS is windows 10.
The text was updated successfully, but these errors were encountered:
GitMate.io thinks the contributor most likely able to help you is @asvetlov.
Possibly related issues are #1455 (How to use Proxy?), #1167 (Client session method that accepts http verb as a parameter), #1293 (Use timeout in client), #3385 (Disable body parameter in HTTPException constructor), and #499 (Url GET parameters are lost when redirecting).
I found the error, I passed an argument format as the python requests, so basically I passed a dictionary object. When I changed it to string, everything worked fine. But it seems it does not work work with https. I hope you guys can make a update for this.
Code ist simple
Expected:
When it's a timeout problem, it returns None.
Actual:
this function always raises the error: "Constructor parameter should be str". I removed the option timeout and headers, but it still the same case. Only when I left the only option url, it can run correctly.
It seems the options for this session.get are not available.
my aiohttp is 3.4.4 and my OS is windows 10.
The text was updated successfully, but these errors were encountered: