[Python] WebScraping JWT Python

Discussão em 'Python' iniciado por Stack, Fevereiro 24, 2025.

  1. Stack

    Stack Membro Participativo

    I just started to learn webscraping with python and I got stuck on a small project. I am trying to capture the Authorization token that is no-where to be found from this website "https://www.easistent.com/stran/". I have figured out that I need to send a post request to an api that is located on "https://www.easistent.com/p/ajax_prijava" with my credidentals. The problem is I cannot find my JWT token anywhere. It isn't in storage, not in response and I don't know where else to look for.

    async def login(session):
    payload = {
    "uporabnik": (None, USERNAME),
    "geslo": (None, PASSWORD)
    }

    headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
    "Referer": "https://www.easistent.com/stran/",
    "Origin": "https://www.easistent.com"
    }

    async with session.post("https://www.easistent.com/p/ajax_prijava", data=payload, headers=headers) as response:
    if response.status == 200:
    easis_session = response.cookies.get("easistent_session")
    if easis_session:
    return easis_session
    else:
    print("Session cookie missing.")
    return None



    This is my code for login and than for my second request i need the authorization token that i need to manually refresh. Please help me.

    Continue reading...

Compartilhe esta Página