mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-20 01:42:50 +01:00
cleanup
This commit is contained in:
parent
da9490259a
commit
08f40e890b
@ -603,7 +603,6 @@ def _perform_login(self, username, password):
|
||||
self._initialize_oauth(user, password)
|
||||
|
||||
_OAUTH_USER = None
|
||||
_OAUTH_REFRESH_TOKEN = None
|
||||
_OAUTH_ACCESS_TOKEN_CACHE = {}
|
||||
|
||||
# YouTube TV (TVHTML5) client
|
||||
@ -896,7 +895,7 @@ def _generate_cookie_auth_headers(self, *, ytcfg=None, account_syncid=None, sess
|
||||
headers = {}
|
||||
account_syncid = account_syncid or self._extract_account_syncid(ytcfg)
|
||||
if account_syncid:
|
||||
headers['X-Goog-AuthUser'] = account_syncid
|
||||
headers['X-Goog-PageId'] = account_syncid
|
||||
if session_index is None:
|
||||
session_index = self._extract_session_index(ytcfg)
|
||||
if account_syncid or session_index is not None:
|
||||
@ -927,7 +926,6 @@ def generate_api_headers(
|
||||
return filter_dict(headers)
|
||||
|
||||
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'):
|
||||
return {}
|
||||
return self._generate_oauth_headers()
|
||||
|
Loading…
Reference in New Issue
Block a user