(response, destination, chunk_size=32 * 1024)
| 1290 | raise ImportError("Module requests not found. Please install requests via pip or other package managers.") |
| 1291 | |
| 1292 | def save_response_content(response, destination, chunk_size=32 * 1024): |
| 1293 | |
| 1294 | total_size = int(response.headers.get('content-length', 0)) |
| 1295 | with open(destination, "wb") as f: |
| 1296 | for chunk in tqdm(response.iter_content(chunk_size), total=total_size, unit='B', unit_scale=True, |
| 1297 | desc=destination): |
| 1298 | if chunk: # filter out keep-alive new chunks |
| 1299 | f.write(chunk) |
| 1300 | |
| 1301 | def get_confirm_token(response): |
| 1302 | for key, value in response.cookies.items(): |
no test coverage detected
searching dependent graphs…