Skip to content

Commit

Permalink
[pornpics] fix pagination results from HTML page
Browse files Browse the repository at this point in the history
prevent URLs containing the root URL twice
  • Loading branch information
mikf committed Jan 27, 2025
1 parent b201f91 commit b9567ae
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gallery_dl/extractor/pornpics.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ def _pagination(self, url, params=None):
# fetch first 20 galleries from HTML
# since '"offset": 0' does not return a JSON response
page = self.request(url).text
for path in text.extract_iter(
for href in text.extract_iter(
page, 'class="rel-link" href="', '"'):
yield {"g_url": self.root + path}
if href[0] == "/":
href = self.root + href
yield {"g_url": href}
del page
params = {"offset": 20}

Expand Down

0 comments on commit b9567ae

Please sign in to comment.