summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPhilipp Hagemeister <[email protected]>2014-07-11 11:08:36 +0200
committerPhilipp Hagemeister <[email protected]>2014-07-11 11:08:36 +0200
commit45ead916d12ced01158d620f18e7ac1021d3f3dd (patch)
tree8a2881133da848701ecd147199af7b94023e5863
parent3a0879c8c801d27087396613d80f83c112a328f9 (diff)
downloadyoutube-dl-45ead916d12ced01158d620f18e7ac1021d3f3dd.tar.gz
youtube-dl-45ead916d12ced01158d620f18e7ac1021d3f3dd.zip
[vimple] Do not fail if duration is missing
-rw-r--r--youtube_dl/extractor/vimple.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/extractor/vimple.py b/youtube_dl/extractor/vimple.py
index f3a807cd3..86344849a 100644
--- a/youtube_dl/extractor/vimple.py
+++ b/youtube_dl/extractor/vimple.py
@@ -1,11 +1,13 @@
# coding: utf-8
from __future__ import unicode_literals
+
import re
import zlib
import base64
import xml.etree.ElementTree
from .common import InfoExtractor
+from ..utils import int_or_none
class VimpleIE(InfoExtractor):
@@ -79,6 +81,6 @@ class VimpleIE(InfoExtractor):
'title': video.find('Title').text,
'formats': formats,
'thumbnail': video.find('Poster').get('url'),
- 'duration': int(video.get('duration')),
+ 'duration': int_or_none(video.get('duration')),
'webpage_url': video.find('Share').get('videoPageUrl'),
}