mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 18:53:21 +01:00
[sankaku] rewrite URLs to s.sankakucomplex.com (#2746)
This commit is contained in:
parent
d5ded11aa8
commit
32c75d12e8
@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright 2014-2021 Mike Fährmann
|
||||
# Copyright 2014-2022 Mike Fährmann
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 2 as
|
||||
@ -49,6 +49,8 @@ class SankakuExtractor(BooruExtractor):
|
||||
self.log.warning(
|
||||
"Login required to download 'contentious_content' posts")
|
||||
SankakuExtractor._warning = False
|
||||
elif url[8] == "v":
|
||||
url = "https://s.sankakucomplex.com" + url[url.index("/", 8):]
|
||||
return url
|
||||
|
||||
@staticmethod
|
||||
@ -79,8 +81,8 @@ class SankakuTagExtractor(SankakuExtractor):
|
||||
test = (
|
||||
("https://sankaku.app/?tags=bonocho", {
|
||||
"count": 5,
|
||||
"pattern": r"https://v\.sankakucomplex\.com/data/[^/]{2}/[^/]{2}"
|
||||
r"/[^/]{32}\.\w+\?e=\d+&expires=\d+&m=[^&#]+",
|
||||
"pattern": r"https://s\.sankakucomplex\.com/data/[^/]{2}/[^/]{2}"
|
||||
r"/[^/]{32}\.\w+\?e=\d+&(expires=\d+&)?m=[^&#]+",
|
||||
}),
|
||||
("https://beta.sankakucomplex.com/?tags=bonocho"),
|
||||
("https://chan.sankakucomplex.com/?tags=bonocho"),
|
||||
@ -160,7 +162,7 @@ class SankakuPostExtractor(SankakuExtractor):
|
||||
}),
|
||||
# 'contentious_content'
|
||||
("https://sankaku.app/post/show/21418978", {
|
||||
"pattern": r"https://v\.sankakucomplex\.com"
|
||||
"pattern": r"https://s\.sankakucomplex\.com"
|
||||
r"/data/13/3c/133cda3bfde249c504284493903fb985\.jpg",
|
||||
}),
|
||||
# empty tags (#1617)
|
||||
|
Loading…
Reference in New Issue
Block a user