浏览代码

[mixcloud] Bypass throttling for HTTP formats (#12579, #16424)

Sergey M․ 7 年之前
父节点
当前提交
bc5e4aa57e
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      youtube_dl/extractor/mixcloud.py

+ 4 - 0
youtube_dl/extractor/mixcloud.py

@@ -179,6 +179,10 @@ class MixcloudIE(InfoExtractor):
                     formats.append({
                     formats.append({
                         'format_id': 'http',
                         'format_id': 'http',
                         'url': decrypted,
                         'url': decrypted,
+                        'downloader_options': {
+                            # Mixcloud starts throttling at >~5M
+                            'http_chunk_size': 5242880,
+                        },
                     })
                     })
             self._sort_formats(formats)
             self._sort_formats(formats)