Browse Source

[safari] Don't pollute std_headers (#8778)

totalwebcasting
Yen Chi Hsuan 9 years ago
parent
commit
e41acb6364
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      youtube_dl/extractor/safari.py

+ 3
- 2
youtube_dl/extractor/safari.py View File

@ -36,12 +36,13 @@ class SafariBaseIE(InfoExtractor):
if username is None:
self.raise_login_required('safaribooksonline.com account is required')
headers = std_headers
headers = std_headers.copy()
if 'Referer' not in headers:
headers['Referer'] = self._LOGIN_URL
login_page_request = sanitized_Request(self._LOGIN_URL, headers=headers)
login_page = self._download_webpage(
self._LOGIN_URL, None,
login_page_request, None,
'Downloading login form')
csrf = self._html_search_regex(


Loading…
Cancel
Save