[extractor/youtube] Fix 5038f6d713

* [fragment] Fix `request_data`
* [youtube] Don't use POST for now. It may be easier to break in future

Authored by: bashonly, coletdjnz
pull/6383/head
pukkandan 2 years ago
parent 65f6e80780
commit f34804b2f9
No known key found for this signature in database
GPG Key ID: 7EEE9E1E817D0A39

@ -466,7 +466,8 @@ class FragmentFD(FileDownloader):
for retry in RetryManager(self.params.get('fragment_retries'), error_callback):
try:
ctx['fragment_count'] = fragment.get('fragment_count')
if not self._download_fragment(ctx, fragment['url'], info_dict, headers):
if not self._download_fragment(
ctx, fragment['url'], info_dict, headers, info_dict.get('request_data')):
return
except (urllib.error.HTTPError, http.client.IncompleteRead) as err:
retry.error = err

@ -132,6 +132,7 @@ class InfoExtractor:
is parsed from a string (in case of
fragmented media)
for MSS - URL of the ISM manifest.
* request_data Data to send in POST request to the URL
* manifest_url
The URL of the manifest file in case of
fragmented media:

@ -3778,7 +3778,6 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
if no_audio or no_video:
CHUNK_SIZE = 10 << 20
dct.update({
'request_data': b'x',
'protocol': 'http_dash_segments',
'fragments': [{
'url': update_url_query(dct['url'], {

Loading…
Cancel
Save