mirror of
https://github.com/m4rcel-lol/m5rcode.git
synced 2025-12-07 03:23:57 +05:30
8 lines
220 B
Python
8 lines
220 B
Python
import requests, zipfile, io
|
|
|
|
def download_and_extract(url, target_dir):
|
|
resp = requests.get(url)
|
|
resp.raise_for_status()
|
|
with zipfile.ZipFile(io.BytesIO(resp.content)) as z:
|
|
z.extractall(target_dir)
|