mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 01:02:13 +01:00
cleanup
This commit is contained in:
parent
da9490259a
commit
08f40e890b
1 changed files with 1 additions and 3 deletions
|
@ -603,7 +603,6 @@ def _perform_login(self, username, password):
|
||||||
self._initialize_oauth(user, password)
|
self._initialize_oauth(user, password)
|
||||||
|
|
||||||
_OAUTH_USER = None
|
_OAUTH_USER = None
|
||||||
_OAUTH_REFRESH_TOKEN = None
|
|
||||||
_OAUTH_ACCESS_TOKEN_CACHE = {}
|
_OAUTH_ACCESS_TOKEN_CACHE = {}
|
||||||
|
|
||||||
# YouTube TV (TVHTML5) client
|
# YouTube TV (TVHTML5) client
|
||||||
|
@ -896,7 +895,7 @@ def _generate_cookie_auth_headers(self, *, ytcfg=None, account_syncid=None, sess
|
||||||
headers = {}
|
headers = {}
|
||||||
account_syncid = account_syncid or self._extract_account_syncid(ytcfg)
|
account_syncid = account_syncid or self._extract_account_syncid(ytcfg)
|
||||||
if account_syncid:
|
if account_syncid:
|
||||||
headers['X-Goog-AuthUser'] = account_syncid
|
headers['X-Goog-PageId'] = account_syncid
|
||||||
if session_index is None:
|
if session_index is None:
|
||||||
session_index = self._extract_session_index(ytcfg)
|
session_index = self._extract_session_index(ytcfg)
|
||||||
if account_syncid or session_index is not None:
|
if account_syncid or session_index is not None:
|
||||||
|
@ -927,7 +926,6 @@ def generate_api_headers(
|
||||||
return filter_dict(headers)
|
return filter_dict(headers)
|
||||||
|
|
||||||
def generate_webpage_headers(self, url):
|
def generate_webpage_headers(self, url):
|
||||||
# Do not need to add cookie auth headers to webpage requests - surprise - it uses hte cookies instead
|
|
||||||
if not urllib.parse.urlparse(url).netloc.endswith('youtube.com'):
|
if not urllib.parse.urlparse(url).netloc.endswith('youtube.com'):
|
||||||
return {}
|
return {}
|
||||||
return self._generate_oauth_headers()
|
return self._generate_oauth_headers()
|
||||||
|
|
Loading…
Reference in a new issue