[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, 1109 Views

urllib’s `geturl()` is the answer for python3 get response path from urllib.

But honestly, urllib is a bit of a relic. `requests` or even `httpx` are modern alternatives that handle this stuff gracefully.

Here’s the `requests` version:
```python
import requests
print(requests.get("http://example.com").url)
```

So much cleaner.



Users browsing this thread: 1 Guest(s)