Add fallback to -rs reason.

This commit is contained in:
limkokhole
2022-01-19 11:18:22 +08:00
parent e0cac6ea91
commit c79b99ac07
2 changed files with 3 additions and 3 deletions

View File

@@ -93,7 +93,7 @@ Download all images/videos from Pinterest user/board/section.
### Example Output: ### Example Output:
xb@dnxb:~/Downloads/pinterest/pinterest-downloader$ python3 pinterest-downloader.py -d comp https://www.pinterest.com/antonellomiglio/computer/ xb@dnxb:~/Downloads/pinterest/pinterest-downloader$ python3 pinterest-downloader.py -d comp https://www.pinterest.com/antonellomiglio/computer/
[...] Getting all images in this board: computer ... [ 74 / ? ] [...] Getting all images in this board: computer ... [ 74 / ? ]
[W] This images list is not sorted correctly, fallback to -rs for this list. [W] This images list is not sorted(Due to user reorder or alphanumeric pin ID), fallback to -rs for this list.
[...] Getting all images in this board: computer ... [ 173 / ? ] [] Found 195 image/videos [...] Getting all images in this board: computer ... [ 173 / ? ] [] Found 195 image/videos
Download into directory: comp/antonellomiglio/Computer Download into directory: comp/antonellomiglio/Computer

View File

@@ -1096,7 +1096,7 @@ Please ensure your username/boardname/[section] or link has media item.\n') )
if img['id'].isdigit(): if img['id'].isdigit():
img_curr = img['id'] img_curr = img['id']
if img_prev and (float(img_curr) > float(img_prev)): if img_prev and (float(img_curr) > float(img_prev)):
cprint(''.join([ HIGHER_YELLOW, '%s' % ('\n[W] This images list is not sorted correctly, fallback to -rs for this list.\n\n') ]), attrs=BOLD_ONLY, end='' ) cprint(''.join([ HIGHER_YELLOW, '%s' % ('\n[W] This images list is not sorted(Due to user reorder or alphanumeric pin ID), fallback to -rs for this list.\n\n') ]), attrs=BOLD_ONLY, end='' )
sorted_api = False sorted_api = False
reach_lastest_pin = False reach_lastest_pin = False
if on_hold_break: if on_hold_break:
@@ -1112,7 +1112,7 @@ Please ensure your username/boardname/[section] or link has media item.\n') )
on_hold_break = True on_hold_break = True
img_prev = img_curr img_prev = img_curr
else: else:
cprint(''.join([ HIGHER_YELLOW, '%s' % ('\n[W] This images list is not sorted correctly, fallback to -rs for this list.\n\n') ]), attrs=BOLD_ONLY, end='' ) cprint(''.join([ HIGHER_YELLOW, '%s' % ('\n[W] This images list is not sorted(Due to user reorder or alphanumeric pin ID), fallback to -rs for this list.\n\n') ]), attrs=BOLD_ONLY, end='' )
sorted_api = False sorted_api = False
reach_lastest_pin = False reach_lastest_pin = False
imgs_round = data['resource_response']['data'] # replaced back above imgs_round = data['resource_response']['data'] # replaced back above