Merge pull request #8819 from remitamine/simple-webpage-requests
[youtube-dl] / youtube_dl / extractor / twitch.py
index 0cf240e1e532b74d2a1b7d05a5c1943cde62ec9e..958bf8fff58b4264742871ba019d9f8c5be21adb 100644 (file)
@@ -252,6 +252,7 @@ class TwitchVodIE(TwitchItemBaseIE):
                 self._USHER_BASE, item_id,
                 compat_urllib_parse.urlencode({
                     'allow_source': 'true',
+                    'allow_audio_only': 'true',
                     'allow_spectre': 'true',
                     'player': 'twitchweb',
                     'nauth': access_token['token'],
@@ -303,8 +304,7 @@ class TwitchPlaylistBaseIE(TwitchBaseIE):
                     'Twitch paging is broken on twitch side, requesting all videos at once',
                     channel_id)
                 broken_paging_detected = True
-                limit = total
-                offset = 0
+                offset = total
                 counter_override = '(all at once)'
                 continue
             entries.extend(page_entries)
@@ -432,6 +432,7 @@ class TwitchStreamIE(TwitchBaseIE):
 
         query = {
             'allow_source': 'true',
+            'allow_audio_only': 'true',
             'p': random.randint(1000000, 10000000),
             'player': 'twitchweb',
             'segment_preference': '4',