Browse Source

[bandcamp] Modernize

totalwebcasting
Sergey M․ 9 years ago
parent
commit
ba717dca97
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      youtube_dl/extractor/bandcamp.py

+ 4
- 2
youtube_dl/extractor/bandcamp.py View File

@ -10,6 +10,8 @@ from ..compat import (
)
from ..utils import (
ExtractorError,
float_or_none,
int_or_none,
)
@ -56,7 +58,7 @@ class BandcampIE(InfoExtractor):
'ext': ext,
'vcodec': 'none',
'acodec': ext,
'abr': int(abr_str),
'abr': int_or_none(abr_str),
})
self._sort_formats(formats)
@ -65,7 +67,7 @@ class BandcampIE(InfoExtractor):
'id': compat_str(data['id']),
'title': data['title'],
'formats': formats,
'duration': float(data['duration']),
'duration': float_or_none(data.get('duration')),
}
else:
raise ExtractorError('No free songs found')


Loading…
Cancel
Save