[Python] m3u8 URL scraping

Discussão em 'Python' iniciado por Stack, Abril 16, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to find the request URL of a m3u8 file programmatically, without using the Browser network tab. With the python code down here I still can't get the request URL of the m3u8 file. Screenshot of the request URL

    from playwright.sync_api import sync_playwright

    url = "https://example.com"

    with sync_playwright() as p:
    browser = p.chromium.launch()
    page = browser.new_page()

    page.on("response", lambda response: print(
    "<<", response.status, response.url))
    page.goto(url, wait_until="networkidle", timeout=90000)

    print(page.content())

    page.context.close()
    browser.close()


    my question therefore is: what am I missing that I am not able to access the m3u8 URL?

    Continue reading...

Compartilhe esta Página