admin管理员组

文章数量:1562468

一、安装playwright

pip install playwright
playwright install

二、模拟手机浏览网页

  • 案例一:
# Python版本:3.7
# -*- coding:utf-8 -*-

from playwright.sync_api import sync_playwright
import time


def run(playwright):
    webkit = playwright.webkit
    iphone = playwright.devices["iPhone 12 Pro"]
    browser = webkit.launch(headless=False)
    context = browser.new_context(**iphone)
    page =

本文标签: 爬虫浏览器网页手机playwright