INNER CODE UNIT · Python

build_authorization_header

cwuom/NeriPlayer · tools_pub/ytmusic_api_probe.py:409

def build_authorization_header(
    cookie_header: str,
    origin: str,
    user_session_id: str = "",
) -> str:
    now_epoch_seconds = int(time.time())
    values = []
    sapisid = (
        cookie_value(cookie_header, "SAPISID")
        or cookie_value(cookie_header, "__Secure-3PAPISID")
        or cookie_value(cookie_header, "__Secure-1PAPISID")
        or cookie_value(cookie_header, "APISID")
    )
    sapisid_1p = cookie_value(cookie_header, "__Secure-1PAPISID")
    sapisid_3p = cookie_value(cookie_header, "__Secure-3PAPISID")
    if sapisid:
        values.append(
            build_sid_authorization(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…