[myportfolio] raise 'NotFoundError' for deleted posts

pull/960/head
Mike Fährmann 4 years ago
parent f317a57c5e
commit 27e31f4a16
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -9,7 +9,7 @@
"""Extract images from https://www.myportfolio.com/"""
from .common import Extractor, Message
from .. import text
from .. import text, exception
class MyportfolioGalleryExtractor(Extractor):
@ -31,9 +31,8 @@ class MyportfolioGalleryExtractor(Extractor):
"pattern": r"https://andrewling\.myportfolio\.com/[^/?&#+]+$",
"count": ">= 6",
}),
# no explicit title
("https://stevenilousphotography.myportfolio.com/society", {
"keyword": "49e7ff6322645c22b409280656202c2736a380c9",
"exception": exception.NotFoundError,
}),
# custom domain
("myportfolio:https://tooco.com.ar/6-of-diamonds-paradise-bird", {
@ -89,8 +88,10 @@ class MyportfolioGalleryExtractor(Extractor):
if title:
title = title.partition(">")[2]
user = user[:-len(title)-3]
else:
elif user:
user, _, title = user.partition(" - ")
else:
raise exception.NotFoundError()
return {
"user": text.unescape(user),

Loading…
Cancel
Save