summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/bunkr.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2024-12-02 00:31:59 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2024-12-02 00:31:59 -0500
commit1981ccaaea6eab2cf32536ec5afe132a870914d8 (patch)
tree013f1e17d922d3a6abf7f57aa6a175c2ce5d93bc /gallery_dl/extractor/bunkr.py
parentfc004701f923bb954a22c7fec2ae8d607e78cb2b (diff)
New upstream version 1.28.0.upstream/1.28.0
Diffstat (limited to 'gallery_dl/extractor/bunkr.py')
-rw-r--r--gallery_dl/extractor/bunkr.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/gallery_dl/extractor/bunkr.py b/gallery_dl/extractor/bunkr.py
index 6c79d0a..3e12452 100644
--- a/gallery_dl/extractor/bunkr.py
+++ b/gallery_dl/extractor/bunkr.py
@@ -22,13 +22,14 @@ else:
BASE_PATTERN = (
r"(?:bunkr:(?:https?://)?([^/?#]+)|"
r"(?:https?://)?(?:app\.)?(bunkr+"
- r"\.(?:s[kiu]|[cf]i|p[hks]|ru|la|is|to|a[cx]"
+ r"\.(?:s[kiu]|c[ir]|fi|p[hks]|ru|la|is|to|a[cx]"
r"|black|cat|media|red|site|ws|org)))"
)
DOMAINS = [
"bunkr.ac",
"bunkr.ci",
+ "bunkr.cr",
"bunkr.fi",
"bunkr.ph",
"bunkr.pk",
@@ -110,13 +111,17 @@ class BunkrAlbumExtractor(LolisafeAlbumExtractor):
def fetch_album(self, album_id):
# album metadata
- page = self.request(self.root + "/a/" + self.album_id).text
+ page = self.request(self.root + "/a/" + album_id).text
title, size = text.split_html(text.extr(
page, "<h1", "</span>").partition(">")[2])
+ if "&" in title:
+ title = title.replace(
+ "&lt;", "<").replace("&gt;", ">").replace("&amp;", "&")
+ # files
items = list(text.extract_iter(page, "<!-- item -->", "<!-- -->"))
return self._extract_files(items), {
- "album_id" : self.album_id,
+ "album_id" : album_id,
"album_name" : title,
"album_size" : text.extr(size, "(", ")"),
"count" : len(items),