aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dl/extractor/twitch.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-09-15 22:18:38 +0700
committerSergey M․ <dstftw@gmail.com>2017-09-15 22:18:38 +0700
commitb763e1d68c6becc414a802a452f5aa819c5de920 (patch)
treef8101354733890ecc22b9bf0af5577743237bbd4 /youtube_dl/extractor/twitch.py
parentcbf85239bbb835162725cd4c8758831ca1003445 (diff)
downloadyoutube-dl-b763e1d68c6becc414a802a452f5aa819c5de920.zip
youtube-dl-b763e1d68c6becc414a802a452f5aa819c5de920.tar.gz
youtube-dl-b763e1d68c6becc414a802a452f5aa819c5de920.tar.bz2
[twitch] Add support for go.twitch.tv URLs (closes #14215)
Diffstat (limited to 'youtube_dl/extractor/twitch.py')
-rw-r--r--youtube_dl/extractor/twitch.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/youtube_dl/extractor/twitch.py b/youtube_dl/extractor/twitch.py
index 2daf9df..c926c99 100644
--- a/youtube_dl/extractor/twitch.py
+++ b/youtube_dl/extractor/twitch.py
@@ -28,7 +28,7 @@ from ..utils import (
class TwitchBaseIE(InfoExtractor):
- _VALID_URL_BASE = r'https?://(?:www\.)?twitch\.tv'
+ _VALID_URL_BASE = r'https?://(?:(?:www|go)\.)?twitch\.tv'
_API_BASE = 'https://api.twitch.tv'
_USHER_BASE = 'https://usher.ttvnw.net'
@@ -217,7 +217,7 @@ class TwitchVodIE(TwitchItemBaseIE):
_VALID_URL = r'''(?x)
https?://
(?:
- (?:www\.)?twitch\.tv/(?:[^/]+/v|videos)/|
+ (?:(?:www|go)\.)?twitch\.tv/(?:[^/]+/v|videos)/|
player\.twitch\.tv/\?.*?\bvideo=v
)
(?P<id>\d+)
@@ -458,7 +458,7 @@ class TwitchStreamIE(TwitchBaseIE):
_VALID_URL = r'''(?x)
https?://
(?:
- (?:www\.)?twitch\.tv/|
+ (?:(?:www|go)\.)?twitch\.tv/|
player\.twitch\.tv/\?.*?\bchannel=
)
(?P<id>[^/#?]+)
@@ -489,6 +489,9 @@ class TwitchStreamIE(TwitchBaseIE):
}, {
'url': 'https://player.twitch.tv/?channel=lotsofs',
'only_matching': True,
+ }, {
+ 'url': 'https://go.twitch.tv/food',
+ 'only_matching': True,
}]
@classmethod