Yo, I had the same issue last week! The easiest way I found was using `wget` with Python’s `subprocess`.
```python
import subprocess
subprocess.run(["wget", "-r", "-np", "-nH", "your_url_here"])
```
The `-r` makes it recursive, `-np` stops it from crawling parent dirs, and `-nH` skips hostname dirs. Super handy for python download a directory from URL.
Downside? You gotta have `wget` installed. But it’s way cleaner than hacking something with `requests`.
```python
import subprocess
subprocess.run(["wget", "-r", "-np", "-nH", "your_url_here"])
```
The `-r` makes it recursive, `-np` stops it from crawling parent dirs, and `-nH` skips hostname dirs. Super handy for python download a directory from URL.
Downside? You gotta have `wget` installed. But it’s way cleaner than hacking something with `requests`.
