added check if duration is numeric
This commit is contained in:
parent
6c05b8f92c
commit
fa84521ced
@ -229,7 +229,10 @@ class TwitterCardIE(TwitterBaseIE):
|
|||||||
|
|
||||||
title = self._search_regex(r'<title>([^<]+)</title>', webpage, 'title')
|
title = self._search_regex(r'<title>([^<]+)</title>', webpage, 'title')
|
||||||
thumbnail = config.get('posterImageUrl') or config.get('image_src')
|
thumbnail = config.get('posterImageUrl') or config.get('image_src')
|
||||||
duration = float_or_none(config.get('duration') * 10e-4) or duration
|
if config.get('duration'):
|
||||||
|
duration = float_or_none(config.get(duration))
|
||||||
|
if duration:
|
||||||
|
duration *= 10e-4
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user