merge #7352: [pixiv] support 'phixiv.net' URLs
This commit is contained in:
@@ -15,7 +15,7 @@ from datetime import datetime, timedelta
|
|||||||
import itertools
|
import itertools
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
BASE_PATTERN = r"(?:https?://)?(?:www\.|touch\.)?pixiv\.net"
|
BASE_PATTERN = r"(?:https?://)?(?:www\.|touch\.)?ph?ixiv\.net"
|
||||||
USER_PATTERN = BASE_PATTERN + r"/(?:en/)?users/(\d+)"
|
USER_PATTERN = BASE_PATTERN + r"/(?:en/)?users/(\d+)"
|
||||||
|
|
||||||
|
|
||||||
@@ -531,7 +531,7 @@ class PixivMeExtractor(PixivExtractor):
|
|||||||
class PixivWorkExtractor(PixivExtractor):
|
class PixivWorkExtractor(PixivExtractor):
|
||||||
"""Extractor for a single pixiv work/illustration"""
|
"""Extractor for a single pixiv work/illustration"""
|
||||||
subcategory = "work"
|
subcategory = "work"
|
||||||
pattern = (r"(?:https?://)?(?:(?:www\.|touch\.)?pixiv\.net"
|
pattern = (r"(?:https?://)?(?:(?:www\.|touch\.)?ph?ixiv\.net"
|
||||||
r"/(?:(?:en/)?artworks/"
|
r"/(?:(?:en/)?artworks/"
|
||||||
r"|member_illust\.php\?(?:[^&]+&)*illust_id=)(\d+)"
|
r"|member_illust\.php\?(?:[^&]+&)*illust_id=)(\d+)"
|
||||||
r"|(?:i(?:\d+\.pixiv|\.pximg)\.net"
|
r"|(?:i(?:\d+\.pixiv|\.pximg)\.net"
|
||||||
|
|||||||
@@ -101,6 +101,18 @@ __tests__ = (
|
|||||||
"#class" : pixiv.PixivArtworksExtractor,
|
"#class" : pixiv.PixivArtworksExtractor,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"#url" : "https://www.phixiv.net/member_illust.php?id=173530",
|
||||||
|
"#category": ("", "pixiv", "artworks"),
|
||||||
|
"#class" : pixiv.PixivArtworksExtractor,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"#url" : "https://phixiv.net/en/users/56514424/artworks",
|
||||||
|
"#category": ("", "pixiv", "artworks"),
|
||||||
|
"#class" : pixiv.PixivArtworksExtractor,
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"#url" : "https://www.pixiv.net/en/users/173530/avatar",
|
"#url" : "https://www.pixiv.net/en/users/173530/avatar",
|
||||||
"#category": ("", "pixiv", "avatar"),
|
"#category": ("", "pixiv", "avatar"),
|
||||||
@@ -341,6 +353,18 @@ __tests__ = (
|
|||||||
"#class" : pixiv.PixivWorkExtractor,
|
"#class" : pixiv.PixivWorkExtractor,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"#url" : "https://www.phixiv.net/en/artworks/966412",
|
||||||
|
"#category": ("", "pixiv", "work"),
|
||||||
|
"#class" : pixiv.PixivWorkExtractor,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"#url" : "https://phixiv.net/member_illust.php?mode=medium&illust_id=966412",
|
||||||
|
"#category": ("", "pixiv", "work"),
|
||||||
|
"#class" : pixiv.PixivWorkExtractor,
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"#url" : "https://www.pixiv.net/en/artworks/unlisted/eE3fTYaROT9IsZmep386",
|
"#url" : "https://www.pixiv.net/en/artworks/unlisted/eE3fTYaROT9IsZmep386",
|
||||||
"#class" : pixiv.PixivUnlistedExtractor,
|
"#class" : pixiv.PixivUnlistedExtractor,
|
||||||
|
|||||||
Reference in New Issue
Block a user