0
Fix for "urllib.error.HTTPError: HTTP Error 400: Bad Request"
I ran into this error whenever I'm using urllib.request urllretrieve to download some pdf files and it seems it only appears for some links only because other links are working fine without that error. How do I get rid of it
6 Respostas
+ 3
It’s a problem in the other end. It just one of the many http errors.
+ 2
Without code or context of how and when that error is returned. Hard to help you.
Though I'd suggest using "requests" rather than urllib/urllib2
http://docs.python-requests.org/en/latest/index.html
+ 1
Thanks very much Chihiro
+ 1
okay, so if I'm to switch to request, how will I use request to download a file, specifically a pdf file
+ 1
Thanks very much, Toni Isotalo