aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-03-26 18:34:51 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-03-26 18:34:51 +0800
commite68d3a010fcf34455c7922b28a05ccc012381729 (patch)
tree2949c99052dc8ff703a0f269c521e8c2df16c911
parentd10fe8358c064325349469a20be952ba794566d4 (diff)
[twitter] Fix extraction (closes #8966)
HLS and DASH formats are no longer appeared in test cases. I keep them for fear of triggering new errors.
-rw-r--r--youtube_dl/extractor/twitter.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/youtube_dl/extractor/twitter.py b/youtube_dl/extractor/twitter.py
index e70b2ab3c..602538e5c 100644
--- a/youtube_dl/extractor/twitter.py
+++ b/youtube_dl/extractor/twitter.py
@@ -110,10 +110,9 @@ class TwitterCardIE(TwitterBaseIE):
'height': int(m.group('height')),
})
- playlist = config.get('playlist')
- if playlist:
- video_url = playlist[0]['source']
+ video_url = config.get('video_url') or config.get('playlist', [{}])[0].get('source')
+ if video_url:
f = {
'url': video_url,
}
@@ -185,7 +184,6 @@ class TwitterIE(InfoExtractor):
'ext': 'mp4',
'title': 'FREE THE NIPPLE - FTN supporters on Hollywood Blvd today!',
'thumbnail': 're:^https?://.*\.jpg',
- 'duration': 12.922,
'description': 'FREE THE NIPPLE on Twitter: "FTN supporters on Hollywood Blvd today! http://t.co/c7jHH749xJ"',
'uploader': 'FREE THE NIPPLE',
'uploader_id': 'freethenipple',