[nekohouse] fix pagination (#6871)

use distinct names for URL values
This commit is contained in:
Mike Fährmann
2025-01-24 10:18:52 +01:00
parent 783cb83258
commit f5add4048e
2 changed files with 5 additions and 5 deletions

View File

@@ -104,18 +104,18 @@ class NekohouseUserExtractor(NekohouseExtractor):
def items(self):
service, user_id, _ = self.groups
url = "{}/{}/user/{}".format(self.root, service, user_id)
creator_url = "{}/{}/user/{}".format(self.root, service, user_id)
params = {"o": 0}
data = {"_extractor": NekohousePostExtractor}
while True:
html = self.request(url, params=params).text
html = self.request(creator_url, params=params).text
cnt = 0
for post in text.extract_iter(html, "<article", "</article>"):
cnt += 1
url = self.root + text.extr(post, '<a href="', '"')
yield Message.Queue, url, data
post_url = self.root + text.extr(post, '<a href="', '"')
yield Message.Queue, post_url, data
if cnt < 50:
return