What's the best way to download a file to disk using Python3? or How can I download a file to disk wi

18 Replies, 757 Views

If you’re lazy (like me 😆), just use `wget` via subprocess:

```python
import subprocess

url = "https://example.com/file.zip"
subprocess.run(["wget", url])
```

Not pure python3 download file to disk, but it’s one line and works everywhere wget is installed.

Messages In This Thread



Users browsing this thread: 1 Guest(s)