diff options
author | Robert Smith <smithrobertlawrence@gmail.com> | 2016-12-25 14:44:10 -0800 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2016-12-31 22:32:49 +0700 |
commit | 9a0f999585e392f04541e4f6d5c8d26cf18d31a8 (patch) | |
tree | 4457194bca103a45c9beb22c46361ad7fbe3516b /youtube_dl/extractor/twitch.py | |
parent | 3540fe262f6131b220d3af7ee8017e8407e44319 (diff) |
[twitch] Added support for player.twitch.tv URLs (closes #11535)
Diffstat (limited to 'youtube_dl/extractor/twitch.py')
-rw-r--r-- | youtube_dl/extractor/twitch.py | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/youtube_dl/extractor/twitch.py b/youtube_dl/extractor/twitch.py index bbf071da3..09efa505b 100644 --- a/youtube_dl/extractor/twitch.py +++ b/youtube_dl/extractor/twitch.py @@ -206,7 +206,8 @@ class TwitchChapterIE(TwitchItemBaseIE): class TwitchVodIE(TwitchItemBaseIE): IE_NAME = 'twitch:vod' - _VALID_URL = r'%s/[^/]+/v/(?P<id>\d+)' % TwitchBaseIE._VALID_URL_BASE + _VALID_URL_BASE = r'https?://(?:www\.|player\.)?twitch\.tv' + _VALID_URL = r'%s/(?:[^/]+/v/|\?video=v)(?P<id>\d+)' % _VALID_URL_BASE _ITEM_TYPE = 'vod' _ITEM_SHORTCUT = 'v' @@ -230,6 +231,26 @@ class TwitchVodIE(TwitchItemBaseIE): 'skip_download': True, }, }, { + # player.twitch.tv URL + 'url': 'http://player.twitch.tv/?video=v6528877&t=5m10s', + 'info_dict': { + 'id': 'v6528877', + 'ext': 'mp4', + 'title': 'LCK Summer Split - Week 6 Day 1', + 'thumbnail': 're:^https?://.*\.jpg$', + 'duration': 17208, + 'timestamp': 1435131709, + 'upload_date': '20150624', + 'uploader': 'Riot Games', + 'uploader_id': 'riotgames', + 'view_count': int, + 'start_time': 310, + }, + 'params': { + # m3u8 download + 'skip_download': True, + }, + }, { # Untitled broadcast (title is None) 'url': 'http://www.twitch.tv/belkao_o/v/11230755', 'info_dict': { |