projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #10594 from stepshal/https_support
[youtube-dl]
/
youtube_dl
/
extractor
/
bandcamp.py
diff --git
a/youtube_dl/extractor/bandcamp.py
b/youtube_dl/extractor/bandcamp.py
index 991ab0676e6b93a1c64d04f48b3728551bc4ccf0..249c3d9569c440b057af9f6706109545ace32862 100644
(file)
--- a/
youtube_dl/extractor/bandcamp.py
+++ b/
youtube_dl/extractor/bandcamp.py
@@
-162,6
+162,15
@@
class BandcampAlbumIE(InfoExtractor):
'uploader_id': 'dotscale',
},
'playlist_mincount': 7,
'uploader_id': 'dotscale',
},
'playlist_mincount': 7,
+ }, {
+ # with escaped quote in title
+ 'url': 'https://jstrecords.bandcamp.com/album/entropy-ep',
+ 'info_dict': {
+ 'title': '"Entropy" EP',
+ 'uploader_id': 'jstrecords',
+ 'id': 'entropy-ep',
+ },
+ 'playlist_mincount': 3,
}]
def _real_extract(self, url):
}]
def _real_extract(self, url):
@@
-176,8
+185,11
@@
class BandcampAlbumIE(InfoExtractor):
entries = [
self.url_result(compat_urlparse.urljoin(url, t_path), ie=BandcampIE.ie_key())
for t_path in tracks_paths]
entries = [
self.url_result(compat_urlparse.urljoin(url, t_path), ie=BandcampIE.ie_key())
for t_path in tracks_paths]
- title = self._search_regex(
- r'album_title\s*:\s*"(.*?)"', webpage, 'title', fatal=False)
+ title = self._html_search_regex(
+ r'album_title\s*:\s*"((?:\\.|[^"\\])+?)"',
+ webpage, 'title', fatal=False)
+ if title:
+ title = title.replace(r'\"', '"')
return {
'_type': 'playlist',
'uploader_id': uploader_id,
return {
'_type': 'playlist',
'uploader_id': uploader_id,