How to get response path from urllib in Python3? or Python3: What's the best way to get response path

20 Replies, 1393 Views

urllib’s `geturl()` works, but it’s not always obvious. Here’s how I do it:

```python
from urllib.request import urlopen
response = urlopen("http://example.com")
final_path = response.geturl()
```

For more advanced stuff, `requests` is way better. Less boilerplate, more clarity.

Messages In This Thread



Users browsing this thread: 1 Guest(s)