Skip to content

Commit

Permalink
Fix infinite loop in Weasyl Favs downloader
Browse files Browse the repository at this point in the history
  • Loading branch information
Deer-Spangle committed Sep 22, 2024
1 parent 10543c6 commit cbecaec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gallery_dl/extractor/weasyl.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,18 @@ def items(self):
if not owner_login:
owner_login = text.extr(page, '<a href="/~', '"')

new_posts = False
for submitid in text.extract_iter(page, "/submissions/", "/", pos):
if submitid == lastid:
continue
new_posts = True
lastid = submitid
submission = self.request_submission(submitid)
if self.populate_submission(submission):
submission["user"] = owner_login
yield Message.Directory, submission
yield Message.Url, submission["url"], submission

if "&amp;nextid=" not in page:
if not new_posts:
return
params["nextid"] = submitid

0 comments on commit cbecaec

Please sign in to comment.