浏览代码

[spiegeltv] Fix Accept-Encoding issue (server chokes on gzip)

Christoph Döpmann 10 年之前
父节点
当前提交
0198807ef9
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      youtube_dl/extractor/spiegeltv.py

+ 4 - 0
youtube_dl/extractor/spiegeltv.py

@@ -83,6 +83,10 @@ class SpiegeltvIE(InfoExtractor):
                     preference=1,  # Prefer hls since it allows to workaround georestriction
                     m3u8_id='hls', fatal=False)
                 if m3u8_formats is not False:
+                    for m3u8_format in m3u8_formats:
+                        m3u8_format['http_headers'] = {
+                            'Accept-Encoding': 'deflate', # gzip causes trouble on the server side
+                        }
                     formats.extend(m3u8_formats)
             else:
                 formats.append({