[bunkr] change domain to 'app.bunkr.is' (#2634)

This commit is contained in:
Mike Fährmann
2022-06-01 11:30:27 +02:00
parent 7a9cba9c10
commit 8a42d859bf
2 changed files with 15 additions and 5 deletions

View File

@@ -1247,7 +1247,7 @@ Consider all sites to be NSFW unless otherwise known.
</tr>
<tr>
<td>Bunkr</td>
<td>https://bunkr.is/</td>
<td>https://app.bunkr.is/</td>
<td>Albums</td>
<td></td>
</tr>

View File

@@ -20,8 +20,14 @@ class LolisafeExtractor(BaseExtractor):
BASE_PATTERN = LolisafeExtractor.update({
"bunkr": {"root": "https://bunkr.is", "pattern": r"bunkr\.(?:is|to)"},
"zzzz" : {"root": "https://zz.ht" , "pattern": r"zz\.(?:ht|fo)"},
"bunkr": {
"root": "https://app.bunkr.is",
"pattern": r"(?:app\.)?bunkr\.(?:is|to)",
},
"zzzz" : {
"root": "https://zz.ht",
"pattern": r"zz\.(?:ht|fo)",
},
})
@@ -29,7 +35,7 @@ class LolisafeAlbumExtractor(LolisafeExtractor):
subcategory = "album"
pattern = BASE_PATTERN + "/a/([^/?#]+)"
test = (
("https://bunkr.is/a/Lktg9Keq", {
("https://app.bunkr.is/a/Lktg9Keq", {
"pattern": r"https://cdn\.bunkr\.is/test-テスト-\"&>-QjgneIQv\.png",
"content": "0c8768055e4e20e7c7259608b67799171b691140",
"keyword": {
@@ -65,7 +71,11 @@ class LolisafeAlbumExtractor(LolisafeExtractor):
domain = self.config("domain")
if domain is None or domain == "auto":
self.root = text.root_from_url(match.group(0))
if self.category == "bunkr":
self.root = "https://app.bunkr.is"
else:
self.root = text.root_from_url(match.group(0))
else:
self.root = text.ensure_http_scheme(domain)