mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-13 14:37:43 +01:00
[twitch] Add support for go.twitch.tv URLs (closes #14215)
This commit is contained in:
parent
cbf85239bb
commit
b763e1d68c
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
|
|
||||||
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'
|
_API_BASE = 'https://api.twitch.tv'
|
||||||
_USHER_BASE = 'https://usher.ttvnw.net'
|
_USHER_BASE = 'https://usher.ttvnw.net'
|
||||||
@ -217,7 +217,7 @@ class TwitchVodIE(TwitchItemBaseIE):
|
|||||||
_VALID_URL = r'''(?x)
|
_VALID_URL = r'''(?x)
|
||||||
https?://
|
https?://
|
||||||
(?:
|
(?:
|
||||||
(?:www\.)?twitch\.tv/(?:[^/]+/v|videos)/|
|
(?:(?:www|go)\.)?twitch\.tv/(?:[^/]+/v|videos)/|
|
||||||
player\.twitch\.tv/\?.*?\bvideo=v
|
player\.twitch\.tv/\?.*?\bvideo=v
|
||||||
)
|
)
|
||||||
(?P<id>\d+)
|
(?P<id>\d+)
|
||||||
@ -458,7 +458,7 @@ class TwitchStreamIE(TwitchBaseIE):
|
|||||||
_VALID_URL = r'''(?x)
|
_VALID_URL = r'''(?x)
|
||||||
https?://
|
https?://
|
||||||
(?:
|
(?:
|
||||||
(?:www\.)?twitch\.tv/|
|
(?:(?:www|go)\.)?twitch\.tv/|
|
||||||
player\.twitch\.tv/\?.*?\bchannel=
|
player\.twitch\.tv/\?.*?\bchannel=
|
||||||
)
|
)
|
||||||
(?P<id>[^/#?]+)
|
(?P<id>[^/#?]+)
|
||||||
@ -489,6 +489,9 @@ class TwitchStreamIE(TwitchBaseIE):
|
|||||||
}, {
|
}, {
|
||||||
'url': 'https://player.twitch.tv/?channel=lotsofs',
|
'url': 'https://player.twitch.tv/?channel=lotsofs',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
|
}, {
|
||||||
|
'url': 'https://go.twitch.tv/food',
|
||||||
|
'only_matching': True,
|
||||||
}]
|
}]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
Loading…
Reference in New Issue
Block a user