Answers for "python download zip and open it"

1

python how to download zip

url = 'https://codeload.github.com/fogleman/Minecraft/zip/master'
 
# downloading with requests
 
# import the requests library
import requests
 
 
# download the file contents in binary format
r = requests.get(url)
 
# open method to open a file on your system and write the contents
with open("minemaster1.zip", "wb") as code:
    code.write(r.content)
 
 
# downloading with urllib
 
# import the urllib library
import urllib
 
# Copy a network object to a local file
urllib.urlretrieve(url, "minemaster.zip")
Posted by: Guest on June-05-2020
0

python zip files

import shutil
shutil.make_archive(output_filename, 'zip', dir_name)
Posted by: Guest on July-07-2021

Code answers related to "python download zip and open it"

Python Answers by Framework

Browse Popular Code Answers by Language