From bebcd6691a3a67fbfbfc38417a4487c57fb12b13 Mon Sep 17 00:00:00 2001 From: bato3 Date: Fri, 27 Jul 2018 17:42:48 +0200 Subject: [PATCH] checking headers for filesize was bad idea --- youtube_dl/extractor/common.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index e9c4bd037..7dd189b11 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -2643,14 +2643,10 @@ class InfoExtractor(object): formats.extend(self._extract_f4m_formats( source_url, video_id, m3u8_id=m3u8_id, fatal=False)) else: - urlh = self._request_webpage(source_url, video_id, note='Checking format %d information' % format_id, fatal=False) - size = int(urlh.headers.get('Content-Length')) formats.append({ 'url': source_url, 'ext': ext, 'format_id': '%d' % format_id, - 'filesize': size, - 'preference': int(size / 1024 / 1024 / 10), }) if len(formats) == 0: raise ExtractorError('Source not found', expected=True, video_id=video_id)