1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-24 03:32:33 +01:00

[bunkr] fix album names containing <>&

unescaping HTML entities once is not good enough
This commit is contained in:
Mike Fährmann 2024-11-10 20:37:43 +01:00
parent c61c0461a9
commit 096b9f1d26
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -110,13 +110,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),