From 6aadce819b42e2c0daabc7625464994010e40e51 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Fri, 9 Oct 2020 14:41:45 +0000 Subject: patches/youtube-dl: fix bandcamp --- ...tch-album-titles-inside-the-new-JSON-data.patch | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 overlays/patches/youtube-dl/0003-bandcamp-match-album-titles-inside-the-new-JSON-data.patch (limited to 'overlays/patches/youtube-dl/0003-bandcamp-match-album-titles-inside-the-new-JSON-data.patch') diff --git a/overlays/patches/youtube-dl/0003-bandcamp-match-album-titles-inside-the-new-JSON-data.patch b/overlays/patches/youtube-dl/0003-bandcamp-match-album-titles-inside-the-new-JSON-data.patch new file mode 100644 index 000000000000..3c88c19954fb --- /dev/null +++ b/overlays/patches/youtube-dl/0003-bandcamp-match-album-titles-inside-the-new-JSON-data.patch @@ -0,0 +1,31 @@ +From c8f146c5f3cd6600cab8f570b29510ee0d092523 Mon Sep 17 00:00:00 2001 +From: Gilles Pietri +Date: Sun, 27 Sep 2020 14:51:42 +0200 +Subject: [PATCH 3/8] [bandcamp] match album titles inside the new JSON data + block, and unescape the title properly + +From https://github.com/ytdl-org/youtube-dl/pull/26684. +--- + youtube_dl/extractor/bandcamp.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/youtube_dl/extractor/bandcamp.py b/youtube_dl/extractor/bandcamp.py +index 55d110e28..f036a89eb 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, +-- +2.27.0 + -- cgit 1.4.1