Skip to content

Commit

Permalink
[paheal] fix extraction (fixes #1088)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Oct 28, 2020
1 parent 0211af7 commit 558cde1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions gallery_dl/extractor/paheal.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ class PahealExtractor(SharedConfigMixin, Extractor):
root = "https://rule34.paheal.net"

def items(self):
self.session.cookies.set(
"ui-tnc-agreed", "true", domain="rule34.paheal.net")

yield Message.Version, 1
yield Message.Directory, self.get_metadata()

Expand Down Expand Up @@ -65,7 +68,7 @@ def get_posts(self):
page = self.request(url).text

for post in text.extract_iter(
page, '<img id="thumb_', '>Image Only<'):
page, '<img id="thumb_', 'Only</a>'):
yield self._extract_data(post)

if ">Next<" not in page:
Expand All @@ -79,7 +82,8 @@ def _extract_data(post):
md5 , pos = text.extract(post, '/_thumbs/', '/', pos)
url , pos = text.extract(post, '<a href="', '"', pos)

tags, dimensions, size, _ = data.split(" // ")
tags, data, date = data.split("\n")
dimensions, size, ext = data.split(" // ")
width, _, height = dimensions.partition("x")

return {
Expand Down

0 comments on commit 558cde1

Please sign in to comment.