Closed BenjaminUrquhart closed 6 years ago
I made this PR just in case you decided to use that particular API. If you don't want to, close it.
Hi, again thanks for the PR. The site looks good, and I'll fully test the code tomorrow.
Currently getting a 429 error. Too many requests. In a web browser it works, though.
Just for the sake of getting PyWeather to 1,000 commits without a hitch, I'll merge this and then take on dealing with the 429 error (probably need a user agent).
Thanks for the PR!
Defining a custom user agent did the trick.
Here goes 1,000 commits!
Things just get weirder. For whatever reason, running PyWeather in Python 3.6.5 always works (Requests 2.9.1), but doesn't work in Python 3.5 (running Requests 2.18.4).
Going to try and change the user agent to just include the PyWeather version.
Silly me...didn't change the headers in reality. Will try again...
Now it works. I'll implement SSL error catching now that this API has the capability to support HTTPS.
I'll also do that for other requests.get statements if I can.
Nothing else needs to be said. It's all in the title.
Issue #77