mirror of
https://github.com/ytdl-org/ytdl-nightly.git
synced 2024-12-23 13:32:08 +01:00
[safari] Don't pollute std_headers (#8778)
This commit is contained in:
parent
bdf7f13954
commit
e41acb6364
@ -36,12 +36,13 @@ class SafariBaseIE(InfoExtractor):
|
|||||||
if username is None:
|
if username is None:
|
||||||
self.raise_login_required('safaribooksonline.com account is required')
|
self.raise_login_required('safaribooksonline.com account is required')
|
||||||
|
|
||||||
headers = std_headers
|
headers = std_headers.copy()
|
||||||
if 'Referer' not in headers:
|
if 'Referer' not in headers:
|
||||||
headers['Referer'] = self._LOGIN_URL
|
headers['Referer'] = self._LOGIN_URL
|
||||||
|
login_page_request = sanitized_Request(self._LOGIN_URL, headers=headers)
|
||||||
|
|
||||||
login_page = self._download_webpage(
|
login_page = self._download_webpage(
|
||||||
self._LOGIN_URL, None,
|
login_page_request, None,
|
||||||
'Downloading login form')
|
'Downloading login form')
|
||||||
|
|
||||||
csrf = self._html_search_regex(
|
csrf = self._html_search_regex(
|
||||||
|
Loading…
Reference in New Issue
Block a user