[imagevenue] improve error for dead images (#8477)

This commit is contained in:
Mike Fährmann
2025-10-29 09:20:14 +01:00
parent f692380950
commit d7a7557f93
2 changed files with 14 additions and 1 deletions

View File

@@ -174,7 +174,11 @@ class ImagevenueImageExtractor(ImagehostImageExtractor):
example = "https://www.imagevenue.com/ME123456789"
def get_info(self, page):
pos = page.index('class="card-body')
try:
pos = page.index('class="card-body')
except ValueError:
raise exception.NotFoundError("image")
url, pos = text.extract(page, '<img src="', '"', pos)
if url.endswith("/loader.svg"):
url, pos = text.extract(page, '<img src="', '"', pos)