Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- import io
- import zipfile
- def download_extract_zip(url):
- response = requests.get(url)
- with zipfile.ZipFile(io.BytesIO(response.content)) as thezip:
- for zipinfo in thezip.infolist():
- with thezip.open(zipinfo) as thefile:
- yield zipinfo.filename, thefile
Advertisement
Add Comment
Please, Sign In to add comment