[sankaku] extend URL patterns (fixes #2647)

- support URLs with ISO 639-1 language codes
- support black.… and white.… subdomains
This commit is contained in:
Mike Fährmann 2022-06-01 18:41:58 +02:00
parent 6d0aa8c0f3
commit 05d4a0215a
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -15,7 +15,8 @@ from ..cache import cache
import collections
BASE_PATTERN = r"(?:https?://)?" \
r"(?:sankaku\.app|(?:beta|chan)\.sankakucomplex\.com)"
r"(?:(?:chan|beta|black|white)\.sankakucomplex\.com|sankaku\.app)" \
r"(?:/[a-z]{2})?"
class SankakuExtractor(BooruExtractor):
@ -171,8 +172,11 @@ class SankakuPostExtractor(SankakuExtractor):
"tags_general": ["key(mangaka)", "key(mangaka)"],
},
}),
("https://beta.sankakucomplex.com/post/show/360451"),
("https://chan.sankakucomplex.com/post/show/360451"),
("https://chan.sankakucomplex.com/ja/post/show/360451"),
("https://beta.sankakucomplex.com/post/show/360451"),
("https://white.sankakucomplex.com/post/show/360451"),
("https://black.sankakucomplex.com/post/show/360451"),
)
def __init__(self, match):