fix favorites download

This commit is contained in:
Ovear 2022-09-29 15:54:31 +08:00
parent d610cd350e
commit cda7f5bfb4

View file

@ -145,8 +145,10 @@ def next_button(page_url):
else: else:
parse_next_button = s.find("a", class_="button standard right", text="Next") parse_next_button = s.find("a", class_="button standard right", text="Next")
page_num = fav_next_button(parse_next_button) page_num = fav_next_button(parse_next_button)
next_page_url = (parse_next_button.parent.attrs['action'] if 'action'
in parse_next_button.parent.attrs else parse_next_button.attrs['href'])
print( print(
f"Downloading page {page_num} - {config.BASE_URL}{parse_next_button.parent.attrs['action']}" f"Downloading page {page_num} - {config.BASE_URL}{next_page_url}"
) )
return page_num return page_num