aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLéo El Amri <leo@superlel.me>2019-07-17 02:14:40 +0200
committerLéo El Amri <leo@superlel.me>2019-07-17 02:14:40 +0200
commitb811749e5b0710410e4f9603b0c8baac83b3465e (patch)
treee6bd4c4529be9ac860c7182d915108a5f0b7fd07
parent4dcd4b7b163feddc07959ca34cbb29815b354c25 (diff)
Attempt to fix Twitch extractors for new URLs
Twitch changed its URLs for user's videos lists recently. This commit includes fixes for "past broadcasts", "hightlights" and "uploads".
-rw-r--r--youtube_dl/extractor/twitch.py21
1 files changed, 6 insertions, 15 deletions
diff --git a/youtube_dl/extractor/twitch.py b/youtube_dl/extractor/twitch.py
index 0500e33a6..0ed0c1dbb 100644
--- a/youtube_dl/extractor/twitch.py
+++ b/youtube_dl/extractor/twitch.py
@@ -456,58 +456,49 @@ class TwitchAllVideosIE(TwitchVideosBaseIE):
class TwitchUploadsIE(TwitchVideosBaseIE):
IE_NAME = 'twitch:videos:uploads'
- _VALID_URL = r'%s/uploads' % TwitchVideosBaseIE._VALID_URL_VIDEOS_BASE
+ _VALID_URL = r'%s\/?\?.*filter=uploads.*' % TwitchVideosBaseIE._VALID_URL_VIDEOS_BASE
_PLAYLIST_PATH = TwitchVideosBaseIE._PLAYLIST_PATH + 'upload'
_PLAYLIST_TYPE = 'uploads'
_TESTS = [{
- 'url': 'https://www.twitch.tv/spamfish/videos/uploads',
+ 'url': 'https://www.twitch.tv/spamfish/videos?filter=uploads',
'info_dict': {
'id': 'spamfish',
'title': 'Spamfish',
},
'playlist_mincount': 0,
- }, {
- 'url': 'https://m.twitch.tv/spamfish/videos/uploads',
- 'only_matching': True,
}]
class TwitchPastBroadcastsIE(TwitchVideosBaseIE):
IE_NAME = 'twitch:videos:past-broadcasts'
- _VALID_URL = r'%s/past-broadcasts' % TwitchVideosBaseIE._VALID_URL_VIDEOS_BASE
+ _VALID_URL = r'%s\/?\?.*filter=archives.*' % TwitchVideosBaseIE._VALID_URL_VIDEOS_BASE
_PLAYLIST_PATH = TwitchVideosBaseIE._PLAYLIST_PATH + 'archive'
_PLAYLIST_TYPE = 'past broadcasts'
_TESTS = [{
- 'url': 'https://www.twitch.tv/spamfish/videos/past-broadcasts',
+ 'url': 'https://www.twitch.tv/spamfish/videos?filter=archives',
'info_dict': {
'id': 'spamfish',
'title': 'Spamfish',
},
'playlist_mincount': 0,
- }, {
- 'url': 'https://m.twitch.tv/spamfish/videos/past-broadcasts',
- 'only_matching': True,
}]
class TwitchHighlightsIE(TwitchVideosBaseIE):
IE_NAME = 'twitch:videos:highlights'
- _VALID_URL = r'%s/highlights' % TwitchVideosBaseIE._VALID_URL_VIDEOS_BASE
+ _VALID_URL = r'%s\/?\?.*filter=highlights.*' % TwitchVideosBaseIE._VALID_URL_VIDEOS_BASE
_PLAYLIST_PATH = TwitchVideosBaseIE._PLAYLIST_PATH + 'highlight'
_PLAYLIST_TYPE = 'highlights'
_TESTS = [{
- 'url': 'https://www.twitch.tv/spamfish/videos/highlights',
+ 'url': 'https://www.twitch.tv/spamfish/videos?filter=highlights',
'info_dict': {
'id': 'spamfish',
'title': 'Spamfish',
},
'playlist_mincount': 805,
- }, {
- 'url': 'https://m.twitch.tv/spamfish/videos/highlights',
- 'only_matching': True,
}]