How can play all the videos with playwright?

I want to play all the videos on some website with playwright:

from playwright.sync_api import Playwright, sync_playwright, expect
playwright = sync_playwright().start() 
browser= playwright.firefox.launch(headless=False)
context = browser.new_context()
page = context.new_page()
page.goto("some_video_website")

Sign in with name and password and numbers in QR code,it can’t be done automatically,then input the following codes in python console:

urls = ["url1_some_video_website",
        "url2_some_video_website"]

#for privacy,i can't write the whole url,the html structure in 
#the urls make these command works
#page.get_by_text("play").click()
#page1.get_by_role("img").click()

for url in urls:
    page.goto(url)
    with page.expect_popup() as page1_info:
        page.get_by_text("play").click()
        page1 = page1_info.value
        page1.get_by_role("img").click()

I find that only url1 can play.Why only the url1 can play ? How to make all of them to play with playwright?

Unfortunately, without seeing the entire website, there’s no way we can figure out your issue. There must be some difference in the structure of the second website. I’d recommend first copying and pasting the source to both in a diff program so you can look at them.

Or perhaps something changes when you load the next page? Does it work if you put url2 as the first page that loads?