Skip to content

A feature-rich command-line audio/video downloader

[bandcamp] match album titles inside the new JSON data block, and unescape the title properly

Gilles Pietrif43a856334b6
diff --git a/youtube_dl/extractor/bandcamp.py b/youtube_dl/extractor/bandcamp.py
index 55d110e280..f036a89ebd 100644
--- a/youtube_dl/extractor/bandcamp.py
+++ b/youtube_dl/extractor/bandcamp.py
@@ -316,10 +316,10 @@ class BandcampAlbumIE(InfoExtractor):
if self._html_search_meta('duration', elem_content, default=None)]
title = self._html_search_regex(
- r'album_title\s*:\s*"((?:\\.|[^"\\])+?)"',
+ r'album_title\s*(?:"|["\']):\s*(?:"|["\'])((?:\\.|[^"\\])+?)(?:"|["\'])',
webpage, 'title', fatal=False)
if title:
- title = title.replace(r'\"', '"')
+ title = unescapeHTML(title)
return {
'_type': 'playlist',
'uploader_id': uploader_id,