[extractor] Fix bug in f95b9dee45

Closes #3951
This commit is contained in:
pukkandan 2022-06-03 06:15:54 +05:30
parent ac05fb9338
commit 09d02ea429
No known key found for this signature in database
GPG Key ID: 7EEE9E1E817D0A39
1 changed files with 6 additions and 3 deletions

View File

@ -75,6 +75,7 @@ from ..utils import (
unified_strdate,
unified_timestamp,
update_Request,
update_url_query,
url_basename,
url_or_none,
urljoin,
@ -724,9 +725,11 @@ class InfoExtractor:
return err.code in variadic(expected_status)
def _create_request(self, url_or_request, data=None, headers={}, query={}):
if not isinstance(url_or_request, compat_urllib_request.Request):
url_or_request = sanitized_Request(url_or_request)
return update_Request(url_or_request, data=data, headers=headers, query=query)
if isinstance(url_or_request, compat_urllib_request.Request):
return update_Request(url_or_request, data=data, headers=headers, query=query)
if query:
url_or_request = update_url_query(url_or_request, query)
return sanitized_Request(url_or_request, data, headers)
def _request_webpage(self, url_or_request, video_id, note=None, errnote=None, fatal=True, data=None, headers={}, query={}, expected_status=None):
"""