mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-01-23 17:26:38 +00:00
Add X-Youtube-Bootstrap-Logged-In logic
This commit is contained in:
parent
5090388b73
commit
a986b82482
|
@ -831,6 +831,9 @@ def _generate_cookie_auth_headers(self, *, ytcfg=None, account_syncid=None, sess
|
|||
headers['Authorization'] = auth
|
||||
headers['X-Origin'] = origin
|
||||
|
||||
if traverse_obj(ytcfg, 'LOGGED_IN', expected_type=bool):
|
||||
headers['X-Youtube-Bootstrap-Logged-In'] = 'true'
|
||||
|
||||
return headers
|
||||
|
||||
def generate_api_headers(
|
||||
|
@ -3909,7 +3912,7 @@ def _extract_player_response(self, client, video_id, master_ytcfg, player_ytcfg,
|
|||
visitor_data=visitor_data,
|
||||
session_index=self._extract_session_index(master_ytcfg, player_ytcfg),
|
||||
account_syncid=(
|
||||
self._parse_data_sync_id(data_sync_id)
|
||||
self._parse_data_sync_id(data_sync_id)[0]
|
||||
or self._extract_delegated_session_id(master_ytcfg, initial_pr, player_ytcfg)
|
||||
),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue