summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLuca Steeb <[email protected]>2017-08-20 09:32:33 -0700
committerSergey M <[email protected]>2017-08-20 23:32:33 +0700
commit8239c6791a36813cacc337c5c4a8801d181b8b54 (patch)
treed1d7a79dce0ef9397a62fe8323ae106fa650f952
parentb359e977b9bdff704cd58f6f3b34185ecbe450e4 (diff)
downloadyoutube-dl-8239c6791a36813cacc337c5c4a8801d181b8b54.tar.gz
youtube-dl-8239c6791a36813cacc337c5c4a8801d181b8b54.zip
[bandcamp:album] Extract track titles
-rw-r--r--youtube_dl/extractor/bandcamp.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/youtube_dl/extractor/bandcamp.py b/youtube_dl/extractor/bandcamp.py
index 9ddb9af17..be41bd5a2 100644
--- a/youtube_dl/extractor/bandcamp.py
+++ b/youtube_dl/extractor/bandcamp.py
@@ -242,7 +242,12 @@ class BandcampAlbumIE(InfoExtractor):
raise ExtractorError('The page doesn\'t contain any tracks')
# Only tracks with duration info have songs
entries = [
- self.url_result(compat_urlparse.urljoin(url, t_path), ie=BandcampIE.ie_key())
+ self.url_result(
+ compat_urlparse.urljoin(url, t_path),
+ ie=BandcampIE.ie_key(),
+ video_title=self._search_regex(
+ r'<span\b[^>]+\bitemprop=["\']name["\'][^>]*>([^<]+)',
+ elem_content, 'track title', fatal=False))
for elem_content, t_path in track_elements
if self._html_search_meta('duration', elem_content, default=None)]