mirror of
https://github.com/soimort/you-get.git
synced 2025-03-13 11:24:02 +03:00
bandcamp: Sometimes the first key is video_caption
This fixes the exception: File "you-get/lib/python3.4/site-packages/you_get/extractors/bandcamp.py", line 9, in bandcamp_download trackinfo = json.loads(r1(r'(\[{"video_poster_url".*}\]),', html)) File "/usr/lib64/python3.4/json/__init__.py", line 312, in loads s.__class__.__name__))
This commit is contained in:
parent
b19bc2d5db
commit
7040db6618
@ -6,7 +6,7 @@ from ..common import *
|
|||||||
|
|
||||||
def bandcamp_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
|
def bandcamp_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
|
||||||
html = get_html(url)
|
html = get_html(url)
|
||||||
trackinfo = json.loads(r1(r'(\[{"video_poster_url".*}\]),', html))
|
trackinfo = json.loads(r1(r'(\[{"(video_poster_url|video_caption)".*}\]),', html))
|
||||||
for track in trackinfo:
|
for track in trackinfo:
|
||||||
track_num = track['track_num']
|
track_num = track['track_num']
|
||||||
title = '%s. %s' % (track_num, track['title'])
|
title = '%s. %s' % (track_num, track['title'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user