Skip to content

Commit

Permalink
[bunkr] change domain to 'app.bunkr.is' (#2634)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Jun 1, 2022
1 parent 7a9cba9 commit 8a42d85
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/supportedsites.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
18 changes: 14 additions & 4 deletions gallery_dl/extractor/lolisafe.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,22 @@ 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)",
},
})


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": {
Expand Down Expand Up @@ -65,7 +71,11 @@ def __init__(self, match):

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)

Expand Down

0 comments on commit 8a42d85

Please sign in to comment.