liuyuqi-dellpc 8 months ago
parent
commit
93c6154c12
3 changed files with 4 additions and 2 deletions
  1. 1 0
      .gitignore
  2. 2 2
      download_qq_tar.py
  3. 1 0
      pyproject.toml

+ 1 - 0
.gitignore

@@ -1 +1,2 @@
 download_qq_tar
 download_qq_tar
+dist/

+ 2 - 2
download_qq_tar.py

@@ -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()

+ 1 - 0
pyproject.toml

@@ -8,6 +8,7 @@ readme = "README.md"
 [tool.poetry.dependencies]
 [tool.poetry.dependencies]
 python = ">=3.12,<3.14"
 python = ">=3.12,<3.14"
 requests = "^2.32.3"
 requests = "^2.32.3"
+tqdm = "^4.66.5"
 
 
 
 
 [tool.poetry.group.dev.dependencies]
 [tool.poetry.group.dev.dependencies]