[twitter] fix for GIF videos

Example:
- https://twitter.com/potatochef_/status/709229020441743360
This commit is contained in:
Mort Yao 2016-03-19 04:19:07 +01:00
parent 3be2f06877
commit 40968e8e89

View File

@ -44,6 +44,8 @@ def twitter_download(url, output_dir='.', merge=True, info_only=False, **kwargs)
# always use i/cards or videos url
if not re.match(r'https?://twitter.com/i/', url):
url = r1(r'<meta\s*property="og:video:url"\s*content="([^"]+)"', html)
if not url:
url = 'https://twitter.com/i/videos/%s' % item_id
html = get_content(url)
data_config = r1(r'data-config="([^"]*)"', html) or \