[b]"How to Python3 get response code from urllib? Best way to check HTTP status?"[/b] or [b]"Python3 get response

16 Replies, 733 Views

urllib’s quirks are why everyone uses `requests` for python3 get response code from urllib. But if you’re stuck with stdlib, your approach is correct.

For debugging, add `print(dir(response))`—you’ll see `getcode()` isn’t *that* hidden. Just not obvious.

Messages In This Thread



Users browsing this thread: 1 Guest(s)