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:
parent
c61c0461a9
commit
096b9f1d26
@ -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(
|
||||
"<", "<").replace(">", ">").replace("&", "&")
|
||||
|
||||
# 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),
|
||||
|
Loading…
Reference in New Issue
Block a user