From 7fc8a2d163b488f4129b4c7d34bd31ec999c1f01 Mon Sep 17 00:00:00 2001 From: Steven Wallace Date: Thu, 16 Jul 2015 18:31:46 -0500 Subject: [PATCH] Fixed loading of some blip.tv videos. Some videos lack a runtime, so the extractor would crash on them. --- youtube_dl/extractor/bliptv.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/bliptv.py b/youtube_dl/extractor/bliptv.py index fb56cd78d..be91d4bba 100644 --- a/youtube_dl/extractor/bliptv.py +++ b/youtube_dl/extractor/bliptv.py @@ -145,7 +145,11 @@ class BlipTVIE(InfoExtractor): timestamp = parse_iso8601(item.find(blip('datestamp')).text) uploader = item.find(blip('user')).text uploader_id = item.find(blip('userid')).text - duration = int(item.find(blip('runtime')).text) + #some videos lack a runtime + if item.find(blip('runtime')): + duration = int(item.find(blip('runtime')).text) + else: + duration = None media_thumbnail = item.find(media('thumbnail')) thumbnail = media_thumbnail.get('url') if media_thumbnail is not None else item.find(itunes('image')).text categories = [category.text for category in item.findall('category')]