[imagefap] don't return anything for empty profiles (#9034)

This commit is contained in:
Mike Fährmann
2026-02-10 10:28:49 +01:00
parent 640d5f1621
commit ce8d61df66
3 changed files with 13 additions and 4 deletions

View File

@@ -233,12 +233,14 @@ class ImagefapUserExtractor(ImagefapExtractor):
page = response.text
folders = text.extr(
page, ' id="tgl_all" value="', '"').rstrip("|").split("|")
if folders and folders[-1] == "-1":
if folders[-1] == "-1":
last = folders.pop()
if not pnum:
folders.insert(0, last)
elif not folders[0]:
break
yield from folders
params["page"] = pnum = pnum + 1
if f'href="?page={pnum}">{pnum+1}</a>' not in page:
return
break