aiohttp seems to be working fine with most website I have used, but not nasdaq. I am trying to follow this https://stackoverflow.com/a/67641667
and use custom connectors but haven't had any luck so far. is there any other way to find the problem?
Asked
Active
Viewed 199 times
0

Sangeerththan Balachandran
- 593
- 1
- 7
- 18

Gary
- 67
- 1
- 9
1 Answers
0
This is not a valid format of user-agent:
"user-agent": "Mozilla"
As mentioned in MDN docs this is a correct format:
"User-Agent": "Mozilla/5.0 (<system-information>) <platform> (<platform-details>) <extensions>"
So just try replacing your user agent with something like this:
"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/93.0"
Then it should work.

chrondev
- 1
-
fixed for a while but the problem is back. more so, using requests module always works. aiohttp has intermittent issues. – Gary Oct 15 '21 at 03:31