Update twitter.py

This commit is contained in:
Sergey M 2017-09-20 03:57:22 +07:00 committed by GitHub
parent b28516041a
commit 3b869501fb

View File

@ -229,7 +229,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')
duration = float_or_none(config.get('duration'), scale=10e2) or duration duration = float_or_none(config.get('duration'), scale=1000) or duration
return { return {
'id': video_id, 'id': video_id,
@ -372,22 +372,6 @@ class TwitterIE(InfoExtractor):
'params': { 'params': {
'format': 'best[format_id^=http-]', 'format': 'best[format_id^=http-]',
}, },
}, {
# checks for correct duration
'url': 'https://twitter.com/SophiePassmann/status/903676793860829184',
'md5': '0c1edf87dd3afacf7b36b5a5666c00cc',
'info_dict': {
'id': '903676793860829184',
'ext': 'mp4',
'title': 'Sophie Passmann - Schaut euch an, was ich geschickt bekommen habe 😍😍😍 #unboxing #sponsored #ad',
'description': 'Sophie Passmann on Twitter: "Schaut euch an, was ich geschickt bekommen habe 😍😍😍 #unboxing #sponsored #ad https://t.co/jGWWxoVWYm"',
'uploader_id': 'SophiePassmann',
'uploader': 'Sophie Passmann',
'duration': 107.4,
},
'params': {
'skip_download': True,
},
}] }]
def _real_extract(self, url): def _real_extract(self, url):