aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/paheal.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2025-10-07 02:11:45 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2025-10-07 02:11:45 -0400
commitbbe7fac03d881662a458e7fbf870c9d71f5257f4 (patch)
treeb90b8974242d7fcb381e43c69c215c97c2e99197 /gallery_dl/extractor/paheal.py
parent42b62671fabfdcf983a9575221420d85f7fbcac1 (diff)
New upstream version 1.30.9.upstream/1.30.9
Diffstat (limited to 'gallery_dl/extractor/paheal.py')
-rw-r--r--gallery_dl/extractor/paheal.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/gallery_dl/extractor/paheal.py b/gallery_dl/extractor/paheal.py
index 5245f31..490243a 100644
--- a/gallery_dl/extractor/paheal.py
+++ b/gallery_dl/extractor/paheal.py
@@ -9,7 +9,7 @@
"""Extractors for https://rule34.paheal.net/"""
from .common import Extractor, Message
-from .. import text
+from .. import text, exception
class PahealExtractor(Extractor):
@@ -97,7 +97,12 @@ class PahealTagExtractor(PahealExtractor):
base = f"{self.root}/post/list/{self.groups[0]}/"
while True:
- page = self.request(base + str(pnum)).text
+ try:
+ page = self.request(f"{base}{pnum}").text
+ except exception.HttpError as exc:
+ if exc.status == 404:
+ return
+ raise
pos = page.find("id='image-list'")
for post in text.extract_iter(
@@ -146,4 +151,9 @@ class PahealPostExtractor(PahealExtractor):
example = "https://rule34.paheal.net/post/view/12345"
def get_posts(self):
- return (self._extract_post(self.groups[0]),)
+ try:
+ return (self._extract_post(self.groups[0]),)
+ except exception.HttpError as exc:
+ if exc.status == 404:
+ return ()
+ raise