mirror of
https://github.com/FliegendeWurst/googleplay-api.git
synced 2024-11-22 04:44:59 +00:00
Fix progression slow down
Signed-off-by: Matlink <matlink@matlink.fr>
This commit is contained in:
parent
4dca632372
commit
c6973ebd5f
@ -442,8 +442,12 @@ class GooglePlayAPI(object):
|
||||
response_content = bytes()
|
||||
response = requests.get(downloadUrl, headers=headers, cookies=cookies, verify=ssl_verify, stream=True)
|
||||
total_length = int(response.headers.get('content-length'))
|
||||
for chunk in progress.bar(response.iter_content(chunk_size=1024), expected_size=(total_length >> 10) + 1):
|
||||
chunk_size = 32 * (1<<10) # 32 KB
|
||||
bar = progress.Bar(expected_size=(total_length >> 10))
|
||||
for index, chunk in enumerate(response.iter_content(chunk_size=chunk_size)):
|
||||
response_content += chunk
|
||||
bar.show(index * chunk_size >> 10)
|
||||
bar.done()
|
||||
return response_content
|
||||
|
||||
def download(self, packageName, versionCode,
|
||||
|
Loading…
Reference in New Issue
Block a user