|
@@ -32,7 +32,7 @@ def run():
|
|
response = requests.get(url, headers=headers, stream=True)
|
|
response = requests.get(url, headers=headers, stream=True)
|
|
total_size = int(response.headers.get('content-length', 0))
|
|
total_size = int(response.headers.get('content-length', 0))
|
|
|
|
|
|
- with open("qq2.zip", "wb") as file:
|
|
|
|
|
|
+ with open("result.zip", "wb") as file:
|
|
with tqdm(total=total_size, unit='B', unit_scale=True, unit_divisor=1024) as bar:
|
|
with tqdm(total=total_size, unit='B', unit_scale=True, unit_divisor=1024) as bar:
|
|
for chunk in response.iter_content(chunk_size=1024):
|
|
for chunk in response.iter_content(chunk_size=1024):
|
|
if chunk:
|
|
if chunk:
|
|
@@ -40,4 +40,4 @@ def run():
|
|
bar.update(len(chunk))
|
|
bar.update(len(chunk))
|
|
|
|
|
|
if __name__=='__main__':
|
|
if __name__=='__main__':
|
|
- run()
|
|
|
|
|
|
+ run()
|