[twitch:stream] Remove fallback to profile extraction when stream is offline
authorSergey M․ <dstftw@gmail.com>
Sun, 18 Sep 2016 12:10:18 +0000 (19:10 +0700)
committerSergey M․ <dstftw@gmail.com>
Sun, 18 Sep 2016 12:10:18 +0000 (19:10 +0700)
Main page does not contain profile videos anymore

youtube_dl/extractor/twitch.py

index af6d890b0ed965220232392ac85d3739a5353dd2..bc352391ef931ab6691400badebabfcb58047347 100644 (file)
@@ -400,11 +400,8 @@ class TwitchStreamIE(TwitchBaseIE):
             'kraken/streams/%s' % channel_id, channel_id,
             'Downloading stream JSON').get('stream')
 
-        # Fallback on profile extraction if stream is offline
         if not stream:
-            return self.url_result(
-                'http://www.twitch.tv/%s/profile' % channel_id,
-                'TwitchProfile', channel_id)
+            raise ExtractorError('%s is offline' % channel_id, expected=True)
 
         # Channel name may be typed if different case than the original channel name
         # (e.g. http://www.twitch.tv/TWITCHPLAYSPOKEMON) that will lead to constructing