fix
This commit is contained in:
parent
fc78bcada6
commit
3ff44f4226
@ -80,7 +80,15 @@ def download_images(image_urls, dst_dir, file_prefix="img", concurrency=50, time
|
|||||||
:param concurrency: number of requests process simultaneously
|
:param concurrency: number of requests process simultaneously
|
||||||
:return: none
|
:return: none
|
||||||
"""
|
"""
|
||||||
concurrency = len(image_urls)
|
file_count = 0
|
||||||
|
count = 0
|
||||||
|
for image_url in image_urls:
|
||||||
|
file_name = filesName[count]
|
||||||
|
file_path = os.path.join(dst_dir, file_name)
|
||||||
|
if not os.path.exists(file_path):
|
||||||
|
file_count += 1
|
||||||
|
count += 1
|
||||||
|
concurrency = int(file_count)
|
||||||
with concurrent.futures.ThreadPoolExecutor(max_workers=concurrency) as executor:
|
with concurrent.futures.ThreadPoolExecutor(max_workers=concurrency) as executor:
|
||||||
future_list = list()
|
future_list = list()
|
||||||
count = 0
|
count = 0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user