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'
fail(clean_html(login_page))
redirect_page, handle = login_step(
- login_page, handle, 'Logging in as %s' % username, {
+ login_page, handle, 'Logging in', {
'username': username,
'password': password,
})
_VALID_URL = r'''(?x)
https?://
(?:
- (?:www\.)?twitch\.tv/(?:[^/]+/v|videos)/|
+ (?:(?:www|go)\.)?twitch\.tv/(?:[^/]+/v|videos)/|
player\.twitch\.tv/\?.*?\bvideo=v
)
(?P<id>\d+)
_VALID_URL = r'''(?x)
https?://
(?:
- (?:www\.)?twitch\.tv/|
+ (?:(?:www|go)\.)?twitch\.tv/|
player\.twitch\.tv/\?.*?\bchannel=
)
(?P<id>[^/#?]+)
}, {
'url': 'https://player.twitch.tv/?channel=lotsofs',
'only_matching': True,
+ }, {
+ 'url': 'https://go.twitch.tv/food',
+ 'only_matching': True,
}]
@classmethod
r'(?s)clipInfo\s*=\s*({.+?});', webpage, 'clip info'),
video_id, transform_source=js_to_json)
- title = clip.get('channel_title') or self._og_search_title(webpage)
+ title = clip.get('title') or clip.get('channel_title') or self._og_search_title(webpage)
formats = [{
'url': option['source'],