mirror of
https://github.com/mikf/gallery-dl.git
synced 2025-01-31 19:51:34 +01:00
[seiga] support mobile URLs (closes #401)
This commit is contained in:
parent
20fd2d8450
commit
b2151f3928
@ -70,7 +70,7 @@ class SeigaUserExtractor(SeigaExtractor):
|
|||||||
subcategory = "user"
|
subcategory = "user"
|
||||||
directory_fmt = ("{category}", "{user[id]}")
|
directory_fmt = ("{category}", "{user[id]}")
|
||||||
filename_fmt = "{category}_{user[id]}_{image_id}.{extension}"
|
filename_fmt = "{category}_{user[id]}_{image_id}.{extension}"
|
||||||
pattern = (r"(?:https?://)?(?:www\.|seiga\.)?nicovideo\.jp/"
|
pattern = (r"(?:https?://)?(?:www\.|(?:sp\.)?seiga\.)?nicovideo\.jp/"
|
||||||
r"user/illust/(\d+)(?:\?(?:[^&]+&)*sort=([^&#]+))?")
|
r"user/illust/(\d+)(?:\?(?:[^&]+&)*sort=([^&#]+))?")
|
||||||
test = (
|
test = (
|
||||||
("https://seiga.nicovideo.jp/user/illust/39537793", {
|
("https://seiga.nicovideo.jp/user/illust/39537793", {
|
||||||
@ -96,6 +96,7 @@ class SeigaUserExtractor(SeigaExtractor):
|
|||||||
}),
|
}),
|
||||||
("https://seiga.nicovideo.jp/user/illust/39537793"
|
("https://seiga.nicovideo.jp/user/illust/39537793"
|
||||||
"?sort=image_view&target=illust_all"),
|
"?sort=image_view&target=illust_all"),
|
||||||
|
("https://sp.seiga.nicovideo.jp/user/illust/39537793"),
|
||||||
)
|
)
|
||||||
|
|
||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
@ -167,6 +168,7 @@ class SeigaImageExtractor(SeigaExtractor):
|
|||||||
filename_fmt = "{category}_{image_id}.{extension}"
|
filename_fmt = "{category}_{image_id}.{extension}"
|
||||||
pattern = (r"(?:https?://)?(?:"
|
pattern = (r"(?:https?://)?(?:"
|
||||||
r"(?:seiga\.|www\.)?nicovideo\.jp/(?:seiga/im|image/source/)"
|
r"(?:seiga\.|www\.)?nicovideo\.jp/(?:seiga/im|image/source/)"
|
||||||
|
r"|sp\.seiga\.nicovideo\.jp/seiga/#!/im"
|
||||||
r"|lohas\.nicoseiga\.jp/(?:thumb|(?:priv|o)/[^/]+/\d+)/)(\d+)")
|
r"|lohas\.nicoseiga\.jp/(?:thumb|(?:priv|o)/[^/]+/\d+)/)(\d+)")
|
||||||
test = (
|
test = (
|
||||||
("https://seiga.nicovideo.jp/seiga/im5977527", {
|
("https://seiga.nicovideo.jp/seiga/im5977527", {
|
||||||
@ -177,6 +179,7 @@ class SeigaImageExtractor(SeigaExtractor):
|
|||||||
"exception": exception.NotFoundError,
|
"exception": exception.NotFoundError,
|
||||||
}),
|
}),
|
||||||
("https://seiga.nicovideo.jp/image/source/5977527"),
|
("https://seiga.nicovideo.jp/image/source/5977527"),
|
||||||
|
("https://sp.seiga.nicovideo.jp/seiga/#!/im5977527"),
|
||||||
("https://lohas.nicoseiga.jp/thumb/5977527i"),
|
("https://lohas.nicoseiga.jp/thumb/5977527i"),
|
||||||
("https://lohas.nicoseiga.jp/priv"
|
("https://lohas.nicoseiga.jp/priv"
|
||||||
"/759a4ef1c639106ba4d665ee6333832e647d0e4e/1549727594/5977527"),
|
"/759a4ef1c639106ba4d665ee6333832e647d0e4e/1549727594/5977527"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user