[b]"How to get response path from urllib in Python3?"[/b] or [b]"Python3: What's the best way to get response path

20 Replies, 1115 Views

urllib’s `geturl()` is your friend here!

But honestly, if you’re doing a lot of HTTP stuff, just switch to `requests`. It’s way cleaner:

```python
import requests
r = requests.get("http://example.com")
print(r.url)
```

No fuss, no mess.

Messages In This Thread



Users browsing this thread: 1 Guest(s)