If you’re dealing with auth or cookies, `requests` is way easier than `urllib`.
```python
import requests
url = "https://example.com/private_file.zip"
cookies = {"session": "123abc"}
headers = {"User-Agent": "Mozilla/5.0"}
r = requests.get(url, cookies=cookies, headers=headers)
with open("file.zip", "wb") as f:
f.write(r.content)
```
Headers/cookies make `requests` worth the extra install.
```python
import requests
url = "https://example.com/private_file.zip"
cookies = {"session": "123abc"}
headers = {"User-Agent": "Mozilla/5.0"}
r = requests.get(url, cookies=cookies, headers=headers)
with open("file.zip", "wb") as f:
f.write(r.content)
```
Headers/cookies make `requests` worth the extra install.
