abhivsh commited on
Commit
a97612b
·
verified ·
1 Parent(s): e890bae

Update download_and_extract_zip.py

Browse files
Files changed (1) hide show
  1. download_and_extract_zip.py +3 -2
download_and_extract_zip.py CHANGED
@@ -6,7 +6,8 @@ URL = os.getenv('URL')
6
 
7
  def download_and_extract_zip(url, destination_folder):
8
  """Downloads a zip file from a URL and extracts its contents to the specified destination folder."""
9
-
 
10
  try:
11
  # Send an HTTP GET request to the OneDrive link to download the file
12
  response = requests.get(url)
@@ -15,7 +16,7 @@ def download_and_extract_zip(url, destination_folder):
15
  response.raise_for_status()
16
 
17
  # Save the zip file to a temporary location
18
- zip_file_path = "temp.zip"
19
  with open(zip_file_path, "wb") as f:
20
  f.write(response.content)
21
 
 
6
 
7
  def download_and_extract_zip(url, destination_folder):
8
  """Downloads a zip file from a URL and extracts its contents to the specified destination folder."""
9
+ zip_file_path = "temp.zip"
10
+
11
  try:
12
  # Send an HTTP GET request to the OneDrive link to download the file
13
  response = requests.get(url)
 
16
  response.raise_for_status()
17
 
18
  # Save the zip file to a temporary location
19
+
20
  with open(zip_file_path, "wb") as f:
21
  f.write(response.content)
22