⎗ ✓ 1 2 3 4 5 6 7 8 9 10 11 12 13from playwright.sync_api import sync_playwright, Playwright def run(playwright: Playwright): args = ["--user-agent=Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/W.X.Y.Z Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"] browser = playwright.chromium.launch(channel="chrome", headless=False, args=args) page = browser.new_page() page.goto("http://qiita.com") import time time.sleep(3) browser.close() with sync_playwright() as playwright: run(playwright)
Warning LINK You are about to visit a link which has been flagged with the above content warnings. Do you wish to continue? Continue Cancel