[bandcamp] Adhere to youtube-dl specifications
Making optional fields optional
This commit is contained in:
parent
b6661befd5
commit
150fa802ed
@ -62,8 +62,7 @@ class BandcampIE(InfoExtractor):
|
||||
if m_trackinfo:
|
||||
json_code = m_trackinfo.group(1)
|
||||
data = json.loads(json_code)[0]
|
||||
track_id = compat_str(data['id'])
|
||||
|
||||
|
||||
if not data.get('file'):
|
||||
raise ExtractorError('Not streamable', video_id=track_id, expected=True)
|
||||
|
||||
@ -86,9 +85,9 @@ class BandcampIE(InfoExtractor):
|
||||
'title': data['title'],
|
||||
'formats': formats,
|
||||
'duration': float_or_none(data.get('duration')),
|
||||
'track': data['title'],
|
||||
'track_number': data['track_num'],
|
||||
'track_id': track_id,
|
||||
'track': data.get('title'),
|
||||
'track_number': data.get('track_num'),
|
||||
'track_id': data.get('id'),
|
||||
'album': album,
|
||||
'album_artist': album_artist,
|
||||
'release_year': release_year,
|
||||
|
Loading…
x
Reference in New Issue
Block a user