Use `_create_request`

Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
This commit is contained in:
minamotorin 2024-05-08 00:55:20 +09:00 committed by GitHub
parent 93e2dccfa6
commit 21954e6242
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions

View File

@ -1036,8 +1036,7 @@ class InfoExtractor:
webpage_bytes = urlh.read()
if prefix is not None:
webpage_bytes = prefix + webpage_bytes
if isinstance(url_or_request, Request):
data = data if data is not None else url_or_request.data
url_or_request = self._create_request(url_or_request, data)
if self.get_param('dump_intermediate_pages', False):
self.to_screen('Dumping request to ' + urlh.url)
dump = base64.b64encode(webpage_bytes).decode('ascii')