Skip to content

Commit

Permalink
Add date option to ranking download (#1149)
Browse files Browse the repository at this point in the history
  • Loading branch information
Toyem authored Aug 20, 2022
1 parent 0999bd4 commit 590bd88
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions PixivUtil2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,16 @@ def menu_download_by_rank(op_is_valid, args, options, valid_modes=None):
break
else:
print("Invalid Content Type.")
while True:
print(f"Specify the ranking date, valid type is YYYYMMDD (default: today)")
date = input('Date: ').rstrip("\r").lower()
try:
if date != '':
datetime.datetime.strptime(date, "%Y%m%d")
except Exception as ex:
PixivHelper.print_and_log("error", f"Invalid format for ranking date: {date}.")
else:
break
(start_page, end_page) = PixivHelper.get_start_and_end_number()

PixivRankingHandler.process_ranking(sys.modules[__name__],
Expand Down

0 comments on commit 590bd88

Please sign in to comment.