mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-02 11:26:41 +00:00
parent
ac05fb9338
commit
09d02ea429
|
@ -75,6 +75,7 @@
|
||||||
unified_strdate,
|
unified_strdate,
|
||||||
unified_timestamp,
|
unified_timestamp,
|
||||||
update_Request,
|
update_Request,
|
||||||
|
update_url_query,
|
||||||
url_basename,
|
url_basename,
|
||||||
url_or_none,
|
url_or_none,
|
||||||
urljoin,
|
urljoin,
|
||||||
|
@ -724,9 +725,11 @@ def __can_accept_status_code(err, expected_status):
|
||||||
return err.code in variadic(expected_status)
|
return err.code in variadic(expected_status)
|
||||||
|
|
||||||
def _create_request(self, url_or_request, data=None, headers={}, query={}):
|
def _create_request(self, url_or_request, data=None, headers={}, query={}):
|
||||||
if not isinstance(url_or_request, compat_urllib_request.Request):
|
if 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)
|
||||||
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):
|
def _request_webpage(self, url_or_request, video_id, note=None, errnote=None, fatal=True, data=None, headers={}, query={}, expected_status=None):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue