avoid double slashes in URL
This commit is contained in:
parent
de2dcb4f66
commit
c47e802eb2
|
@ -26,7 +26,7 @@ def download_tile(task):
|
||||||
tqdm.write(f'{output_path} is not a PNG, deleting and retrying...')
|
tqdm.write(f'{output_path} is not a PNG, deleting and retrying...')
|
||||||
else:
|
else:
|
||||||
return row, col, 'exist'
|
return row, col, 'exist'
|
||||||
tile_url = f"{base_url}/{row}/{col}"
|
tile_url = f"{base_url}/{row}/{col}".replace('//', '/')
|
||||||
response = requests.get(tile_url, headers=r_headers, proxies=PROXIES if use_proxy else None, timeout=60)
|
response = requests.get(tile_url, headers=r_headers, proxies=PROXIES if use_proxy else None, timeout=60)
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
if not response.headers.get('Content-Type') == 'image/png':
|
if not response.headers.get('Content-Type') == 'image/png':
|
||||||
|
|
Loading…
Reference in New Issue