0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-23 02:25:11 +00:00

[twitch:stream] Improve _VALID_URL (Closes #6294)

This commit is contained in:
Sergey M․ 2015-07-20 02:16:07 +06:00
parent 308c505c3d
commit faa1f83ab4

View file

@ -310,9 +310,9 @@ def _extract_playlist_page(self, response):
class TwitchStreamIE(TwitchBaseIE):
IE_NAME = 'twitch:stream'
_VALID_URL = r'%s/(?P<id>[^/]+)/?(?:\#.*)?$' % TwitchBaseIE._VALID_URL_BASE
_VALID_URL = r'%s/(?P<id>[^/#?]+)/?(?:\#.*)?$' % TwitchBaseIE._VALID_URL_BASE
_TEST = {
_TESTS = [{
'url': 'http://www.twitch.tv/shroomztv',
'info_dict': {
'id': '12772022048',
@ -331,7 +331,10 @@ class TwitchStreamIE(TwitchBaseIE):
# m3u8 download
'skip_download': True,
},
}
}, {
'url': 'http://www.twitch.tv/miracle_doto#profile-0',
'only_matching': True,
}]
def _real_extract(self, url):
channel_id = self._match_id(url)