[twitter] use fallback and scale for duration
This commit is contained in:
parent
fa84521ced
commit
0bd0389bcb
@ -230,9 +230,7 @@ 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')
|
||||||
if config.get('duration'):
|
if config.get('duration'):
|
||||||
duration = float_or_none(config.get(duration))
|
duration = float_or_none(config.get('duration'), scale=10e2) or duration
|
||||||
if duration:
|
|
||||||
duration *= 10e-4
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user