mirror of
https://github.com/blackjack4494/yt-dlc.git
synced 2024-12-21 23:33:10 +00:00
[bandcamp] fix the freeDownloadPage JSON lookup, and use the id from the URL to match the tracks
This commit is contained in:
parent
f43a856334
commit
9385ec4b1c
1 changed files with 3 additions and 3 deletions
|
@ -128,12 +128,12 @@ class BandcampIE(InfoExtractor):
|
|||
release_date = unified_strdate(extract('album_release_date'))
|
||||
|
||||
download_link = self._search_regex(
|
||||
r'freeDownloadPage\s*:\s*(["\'])(?P<url>(?:(?!\1).)+)\1', webpage,
|
||||
r'freeDownloadPage(?:["\']|"):\s*(["\']|")(?P<url>(?:(?!\1).)+)\1', webpage,
|
||||
'download link', default=None, group='url')
|
||||
if download_link:
|
||||
track_id = self._search_regex(
|
||||
r'(?ms)var TralbumData = .*?[{,]\s*id: (?P<id>\d+),?$',
|
||||
webpage, 'track id')
|
||||
r'\?id=(?P<id>\d+)&',
|
||||
download_link, 'track id')
|
||||
|
||||
download_webpage = self._download_webpage(
|
||||
download_link, track_id, 'Downloading free downloads page')
|
||||
|
|
Loading…
Reference in a new issue