1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 10:42:34 +01:00

[inkbunny:following] fix infinite loop

happens when number of watched users is a multiple of 20
This commit is contained in:
Mike Fährmann 2024-07-22 17:59:58 +02:00
parent db9833c28a
commit 3b26748264
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -246,14 +246,12 @@ class InkbunnyFollowingExtractor(InkbunnyExtractor):
data = {"_extractor": InkbunnyUserExtractor}
while True:
cnt = 0
for user in text.extract_iter(
page, '<a class="widget_userNameSmall" href="', '"',
page.index('id="changethumboriginal_form"')):
cnt += 1
yield Message.Queue, self.root + user, data
if cnt < 20:
if "<a title='next page' " not in page:
return
params["page"] += 1
page = self.request(url, params=params).text