[rtp] Move http_headers into the info_dict

This commit is contained in:
Felix S 2022-05-21 13:05:16 +00:00 committed by GitHub
parent fbdb7f5b94
commit d1a5efdd31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,17 +82,11 @@ def _real_extract(self, url):
if f_dash is not None: if f_dash is not None:
formats.extend(self._extract_mpd_formats( formats.extend(self._extract_mpd_formats(
f_dash, video_id, mpd_id='dash', headers=self.__HEADERS)) f_dash, video_id, mpd_id='dash', headers=self.__HEADERS))
for fmt in formats:
fmt.update({
'http_headers': self.__HEADERS,
})
else: else:
formats.append({ formats.append({
'format_id': 'f', 'format_id': 'f',
'url': f, 'url': f,
'vcodec': 'none' if config.get('mediaType') == 'audio' else None, 'vcodec': 'none' if config.get('mediaType') == 'audio' else None,
'http_headers': self.__HEADERS,
}) })
subtitles = {} subtitles = {}
@ -112,4 +106,5 @@ def _real_extract(self, url):
'description': self._html_search_meta(['description', 'twitter:description'], webpage), 'description': self._html_search_meta(['description', 'twitter:description'], webpage),
'thumbnail': config.get('poster') or self._og_search_thumbnail(webpage), 'thumbnail': config.get('poster') or self._og_search_thumbnail(webpage),
'subtitles': subtitles, 'subtitles': subtitles,
'http_headers': self.__HEADERS,
} }