mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-25 09:52:31 +00:00
Reverting the removal of TwitchVideoIE and TwitchChapterIE
This commit is contained in:
parent
7679c23332
commit
a7d44de6da
@ -1231,6 +1231,8 @@
|
|||||||
from .twentythreevideo import TwentyThreeVideoIE
|
from .twentythreevideo import TwentyThreeVideoIE
|
||||||
from .twitcasting import TwitCastingIE
|
from .twitcasting import TwitCastingIE
|
||||||
from .twitch import (
|
from .twitch import (
|
||||||
|
TwitchVideoIE,
|
||||||
|
TwitchChapterIE,
|
||||||
TwitchVodIE,
|
TwitchVodIE,
|
||||||
TwitchProfileIE,
|
TwitchProfileIE,
|
||||||
TwitchAllVideosIE,
|
TwitchAllVideosIE,
|
||||||
|
@ -205,6 +205,43 @@ def _real_extract(self, url):
|
|||||||
return self._extract_media(self._match_id(url))
|
return self._extract_media(self._match_id(url))
|
||||||
|
|
||||||
|
|
||||||
|
class TwitchVideoIE(TwitchItemBaseIE):
|
||||||
|
IE_NAME = 'twitch:video'
|
||||||
|
_VALID_URL = r'%s/[^/]+/b/(?P<id>\d+)' % TwitchBaseIE._VALID_URL_BASE
|
||||||
|
_ITEM_TYPE = 'video'
|
||||||
|
_ITEM_SHORTCUT = 'a'
|
||||||
|
|
||||||
|
_TEST = {
|
||||||
|
'url': 'http://www.twitch.tv/riotgames/b/577357806',
|
||||||
|
'info_dict': {
|
||||||
|
'id': 'a577357806',
|
||||||
|
'title': 'Worlds Semifinals - Star Horn Royal Club vs. OMG',
|
||||||
|
},
|
||||||
|
'playlist_mincount': 12,
|
||||||
|
'skip': 'HTTP Error 404: Not Found',
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class TwitchChapterIE(TwitchItemBaseIE):
|
||||||
|
IE_NAME = 'twitch:chapter'
|
||||||
|
_VALID_URL = r'%s/[^/]+/c/(?P<id>\d+)' % TwitchBaseIE._VALID_URL_BASE
|
||||||
|
_ITEM_TYPE = 'chapter'
|
||||||
|
_ITEM_SHORTCUT = 'c'
|
||||||
|
|
||||||
|
_TESTS = [{
|
||||||
|
'url': 'http://www.twitch.tv/acracingleague/c/5285812',
|
||||||
|
'info_dict': {
|
||||||
|
'id': 'c5285812',
|
||||||
|
'title': 'ACRL Off Season - Sports Cars @ Nordschleife',
|
||||||
|
},
|
||||||
|
'playlist_mincount': 3,
|
||||||
|
'skip': 'HTTP Error 404: Not Found',
|
||||||
|
}, {
|
||||||
|
'url': 'http://www.twitch.tv/tsm_theoddone/c/2349361',
|
||||||
|
'only_matching': True,
|
||||||
|
}]
|
||||||
|
|
||||||
|
|
||||||
class TwitchVodIE(TwitchItemBaseIE):
|
class TwitchVodIE(TwitchItemBaseIE):
|
||||||
IE_NAME = 'twitch:vod'
|
IE_NAME = 'twitch:vod'
|
||||||
_VALID_URL = r'''(?x)
|
_VALID_URL = r'''(?x)
|
||||||
@ -510,6 +547,8 @@ class TwitchStreamIE(TwitchBaseIE):
|
|||||||
def suitable(cls, url):
|
def suitable(cls, url):
|
||||||
return (False
|
return (False
|
||||||
if any(ie.suitable(url) for ie in (
|
if any(ie.suitable(url) for ie in (
|
||||||
|
TwitchVideoIE,
|
||||||
|
TwitchChapterIE,
|
||||||
TwitchVodIE,
|
TwitchVodIE,
|
||||||
TwitchProfileIE,
|
TwitchProfileIE,
|
||||||
TwitchAllVideosIE,
|
TwitchAllVideosIE,
|
||||||
|
Loading…
Reference in New Issue
Block a user