[erome] improve error message for deleted & copyrighted albums (#8665)

This commit is contained in:
Mike Fährmann
2025-12-09 11:59:04 +01:00
parent 4ee998df0a
commit b141bbd2ae
2 changed files with 20 additions and 1 deletions

View File

@@ -74,8 +74,12 @@ class EromeAlbumExtractor(EromeExtractor):
try:
page = self.request(url).text
except exception.HttpError as exc:
if exc.status == 410:
msg = text.extr(exc.response.text, "<h1>", "<")
else:
msg = "Unable to fetch album page"
raise exception.AbortExtraction(
f"{album_id}: Unable to fetch album page ({exc})")
f"{album_id}: {msg} ({exc})")
title, pos = text.extract(
page, 'property="og:title" content="', '"')