add a few tests expecting exceptions
This commit is contained in:
@@ -21,9 +21,14 @@ class PixivUserExtractor(Extractor):
|
||||
directory_fmt = ["{category}", "{artist-id}-{artist-nick}"]
|
||||
filename_fmt = "{category}_{artist-id}_{id}{num}.{extension}"
|
||||
pattern = [r"(?:https?://)?(?:www\.)?pixiv\.net/member(?:_illust)?\.php\?id=(\d+)"]
|
||||
test = [("http://www.pixiv.net/member_illust.php?id=173530", {
|
||||
"url": "8f2fc0437e2095ab750c4340a4eba33ec6269477",
|
||||
})]
|
||||
test = [
|
||||
("http://www.pixiv.net/member_illust.php?id=173530", {
|
||||
"url": "8f2fc0437e2095ab750c4340a4eba33ec6269477",
|
||||
}),
|
||||
("http://www.pixiv.net/member_illust.php?id=173531", {
|
||||
"exception": exception.NotFoundError,
|
||||
}),
|
||||
]
|
||||
member_url = "http://www.pixiv.net/member_illust.php"
|
||||
illust_url = "http://www.pixiv.net/member_illust.php?mode=medium"
|
||||
|
||||
@@ -148,6 +153,9 @@ class PixivWorkExtractor(PixivUserExtractor):
|
||||
"url": "efb622f065b0871e92195e7bee0b4d75bd687d8d",
|
||||
"content": "69a8edfb717400d1c2e146ab2b30d2c235440c5a",
|
||||
}),
|
||||
("http://www.pixiv.net/member_illust.php?mode=medium&illust_id=966411", {
|
||||
"exception": exception.NotFoundError,
|
||||
}),
|
||||
("http://i1.pixiv.net/c/600x600/img-master/img/2008/06/13/00/29/13/966412_p0_master1200.jpg", {
|
||||
"url": "efb622f065b0871e92195e7bee0b4d75bd687d8d",
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user