projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cbf8523
)
[twitch] Add support for go.twitch.tv URLs (closes #14215)
author
Sergey M․
<dstftw@gmail.com>
Fri, 15 Sep 2017 15:18:38 +0000
(22:18 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Fri, 15 Sep 2017 15:18:38 +0000
(22:18 +0700)
youtube_dl/extractor/twitch.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/twitch.py
b/youtube_dl/extractor/twitch.py
index 2daf9dfac923260d94e26d56d6234ae9e3c6ec58..c926c99a999bb88388c77d859e54c8973417b9db 100644
(file)
--- a/
youtube_dl/extractor/twitch.py
+++ b/
youtube_dl/extractor/twitch.py
@@
-28,7
+28,7
@@
from ..utils import (
class TwitchBaseIE(InfoExtractor):
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'
_API_BASE = 'https://api.twitch.tv'
_USHER_BASE = 'https://usher.ttvnw.net'
@@
-217,7
+217,7
@@
class TwitchVodIE(TwitchItemBaseIE):
_VALID_URL = r'''(?x)
https?://
(?:
_VALID_URL = r'''(?x)
https?://
(?:
- (?:
www
\.)?twitch\.tv/(?:[^/]+/v|videos)/|
+ (?:
(?:www|go)
\.)?twitch\.tv/(?:[^/]+/v|videos)/|
player\.twitch\.tv/\?.*?\bvideo=v
)
(?P<id>\d+)
player\.twitch\.tv/\?.*?\bvideo=v
)
(?P<id>\d+)
@@
-458,7
+458,7
@@
class TwitchStreamIE(TwitchBaseIE):
_VALID_URL = r'''(?x)
https?://
(?:
_VALID_URL = r'''(?x)
https?://
(?:
- (?:
www
\.)?twitch\.tv/|
+ (?:
(?:www|go)
\.)?twitch\.tv/|
player\.twitch\.tv/\?.*?\bchannel=
)
(?P<id>[^/#?]+)
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://player.twitch.tv/?channel=lotsofs',
'only_matching': True,
+ }, {
+ 'url': 'https://go.twitch.tv/food',
+ 'only_matching': True,
}]
@classmethod
}]
@classmethod