true counter
This commit is contained in:
parent
c0c013c31b
commit
9f3d47ce6d
@ -10,7 +10,7 @@ from bs4 import BeautifulSoup
|
||||
import click
|
||||
|
||||
__author__ = "Alexander Popov"
|
||||
__version__ = "1.0.3"
|
||||
__version__ = "1.0.4"
|
||||
__license__ = "Unlicense"
|
||||
|
||||
# Путь к директории для загрузки изображений
|
||||
@ -102,6 +102,9 @@ def image_download(image):
|
||||
out_image,
|
||||
)
|
||||
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def main(download_directory, download_pages):
|
||||
"""Главный цикл программы"""
|
||||
@ -128,8 +131,8 @@ def main(download_directory, download_pages):
|
||||
|
||||
# По очереди скачиваем изображения
|
||||
for image in images:
|
||||
image_download(image)
|
||||
downloaded_counter += 1
|
||||
if image_download(image):
|
||||
downloaded_counter += 1
|
||||
|
||||
print(
|
||||
"\r{spinner} Загружено {total_files} файлов.".format(
|
||||
|
Loading…
Reference in New Issue
Block a user