[imagefap] don't return anything for empty profiles (#9034)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -114,8 +114,8 @@ __tests__ = (
|
||||
"#comment" : "empty 'var g_th = $.parseJSON('');' (#8951)",
|
||||
"#category": ("IMHentai", "hentaienvy", "gallery"),
|
||||
"#class" : imhentai.ImhentaiGalleryExtractor,
|
||||
"#metadata": "post",
|
||||
"#count" : 0,
|
||||
"#pattern" : r"https://m8.hentaienvy.com/026/3zf1yedx5m/\d+\.jpg",
|
||||
"#count" : 188,
|
||||
"#log" : "1119432: Missing image data",
|
||||
|
||||
"artist" : [],
|
||||
|
||||
@@ -217,4 +217,11 @@ __tests__ = (
|
||||
"#count" : 100,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://www.imagefap.com/profile/Tiffany_and_me",
|
||||
"#comment" : "empty profile (#9034)",
|
||||
"#class" : imagefap.ImagefapUserExtractor,
|
||||
"#count" : 0,
|
||||
},
|
||||
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user