mirror of
https://github.com/m4rcel-lol/m5rcode.git
synced 2025-12-06 19:13:57 +05:30
Add files via upload
This commit is contained in:
committed by
GitHub
parent
af762526f5
commit
751062a706
7
utils/downloader.py
Normal file
7
utils/downloader.py
Normal file
@@ -0,0 +1,7 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user