Skip to content

Commit

Permalink
[bunkr] update domain to 'bunkr.sk' (mikf#5114)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf authored and bradenhilton committed Feb 5, 2024
1 parent ba77f51 commit 380f48c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/supportedsites.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Consider all listed sites to potentially be NSFW.
</tr>
<tr>
<td>Bunkr</td>
<td>https://bunkrr.ru/</td>
<td>https://bunkr.sk/</td>
<td>Albums, Media Files</td>
<td></td>
</tr>
Expand Down
14 changes: 7 additions & 7 deletions gallery_dl/extractor/bunkr.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.

"""Extractors for https://bunkrr.ru/"""
"""Extractors for https://bunkr.sk/"""

from .lolisafe import LolisafeAlbumExtractor
from .. import text
from urllib.parse import urlsplit, urlunsplit

BASE_PATTERN = r"(?:https?://)?(?:app\.)?bunkr+\.(?:[rs]u|la|is|to)"
BASE_PATTERN = r"(?:https?://)?(?:app\.)?bunkr+\.(?:sk|[rs]u|la|is|to)"

MEDIA_DOMAIN_OVERRIDES = {
"cdn9.bunkr.ru" : "c9.bunkr.ru",
Expand All @@ -27,11 +27,11 @@


class BunkrAlbumExtractor(LolisafeAlbumExtractor):
"""Extractor for bunkrr.ru albums"""
"""Extractor for bunkr.sk albums"""
category = "bunkr"
root = "https://bunkrr.ru"
root = "https://bunkr.sk"
pattern = BASE_PATTERN + r"/a/([^/?#]+)"
example = "https://bunkrr.ru/a/ID"
example = "https://bunkr.sk/a/ID"

def fetch_album(self, album_id):
# album metadata
Expand Down Expand Up @@ -84,11 +84,11 @@ def _extract_file(self, path):


class BunkrMediaExtractor(BunkrAlbumExtractor):
"""Extractor for bunkrr.ru media links"""
"""Extractor for bunkr.sk media links"""
subcategory = "media"
directory_fmt = ("{category}",)
pattern = BASE_PATTERN + r"/[vid]/([^/?#]+)"
example = "https://bunkrr.ru/v/FILENAME"
example = "https://bunkr.sk/v/FILENAME"

def fetch_album(self, album_id):
try:
Expand Down
2 changes: 1 addition & 1 deletion gallery_dl/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.

__version__ = "1.26.7"
__version__ = "1.26.8-dev"
8 changes: 7 additions & 1 deletion test/results/bunkr.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

__tests__ = (
{
"#url" : "https://bunkrr.ru/a/Lktg9Keq",
"#url" : "https://bunkr.sk/a/Lktg9Keq",
"#category": ("lolisafe", "bunkr", "album"),
"#class" : bunkr.BunkrAlbumExtractor,
"#urls" : "https://i-burger.bunkr.ru/test-テスト-\"&>-QjgneIQv.png",
Expand Down Expand Up @@ -64,6 +64,12 @@
"#count" : 9,
},

{
"#url" : "https://bunkrr.ru/a/Lktg9Keq",
"#category": ("lolisafe", "bunkr", "album"),
"#class" : bunkr.BunkrAlbumExtractor,
},

{
"#url" : "https://bunkrr.su/a/Lktg9Keq",
"#category": ("lolisafe", "bunkr", "album"),
Expand Down

0 comments on commit 380f48c

Please sign in to comment.