Files
workflow-web/tasks/chinaunicombidding.py
2025-01-24 21:03:41 +08:00

25 lines
698 B
Python

from playwright.sync_api import sync_playwright
def cmPage(playwright):
browser = playwright.chromium.launch(
headless=False,
args=["--disable-blink-features=AutomationControlled", "--enable-automation"],
)
url = (
"http://www.chinaunicombidding.cn/bidInformation/detail?id=1814155843256635392"
)
context = browser.new_context()
page = context.new_page()
with page.expect_response(
"http://www.chinaunicombidding.cn/api/v1/bizAnno/getAnnoDetailed/*"
) as pageJosnData:
page.goto(url)
print(pageJosnData.value.text())
context.close()
browser.close()
with sync_playwright() as playwright:
cmPage(playwright)