import time
from playwright.sync_api import Playwright, sync_playwright
def get_run(playwright, url):
browser = playwright.chromium.launch(
channel="msedge",
headless=True
)
page = browser.new_page()
page.goto(url)
time.sleep(10)
# Get the final page content
content = page.content()
browser.close()
return content
if __name__ == '__main__':
with sync_playwright() as playwright:
url='https://www.dzwww.com/xinwen/guoneixinwen/202507/t20250725_16258929.htm'
content = get_run(playwright, url)
print(content)