[Python] How to use python requests to get Auth values

Discussão em 'Python' iniciado por Stack, Março 25, 2025.

  1. Stack

    Stack Membro Participativo

    I want to get the value from X-Livestreaming Auth , but my code doesn't work

    err_code":7913016,"err_msg":"ErrorSVFailed

    [​IMG]

    this is my code

    import requests

    url = "https://live.shopee.com.my/webapi/v1/session"

    headers = {
    "accept": "application/json, text/plain, */*",
    "accept-encoding": "gzip, deflate, br, zstd",
    "accept-language": "en,id;q=0.9,en-US;q=0.8",
    "client-info": "platform=9;device_id=qqOw7mwFnxIGOI90wsyLmqRHrsSke14o;language=en",
    "cookie": "SPC_F=dM84ACgT2hu2NW2HH3LwMO0PdrUCbIEQ; REC_T_ID=32276254-feda-11ef-87a5-b2bd90c9f6c5; _gcl_au=1.1.413550932.1741739854; language=en; SPC_CLIENTID=ZE04NEFDZ1QyaHUyxhvncevdrklctovu",
    "referer": "https://live.shopee.com.my/pc/live-end?type=KOL&bgurl=my-11134104-7rasi-m78oyl6u95c95d&session=10918198",
    "sec-ch-ua": '"Chromium";v="134", "Not:A-Brand";v="24", "Google Chrome";v="134"',
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": '"Windows"',
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-origin",
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36",
    }

    response = requests.get(url, headers=headers)

    if response.status_code == 200:
    print(response.json())
    else:
    print(response.status_code, response.text)



    any ideas ?

    Continue reading...

Compartilhe esta Página