文档API Reference — Pyppeteer 0.0.25 documentation
快速上手常用API总结:
# -*- coding:utf-8 -*-
import asyncio
import time
from pyppeteer.launcher import launch
async def main():
c = {
# 'userDataDir': './userdata',# 用户临时目录,保存cookie可以开启
'args': [
'--start-maximized', # 最大化窗口
# '--proxy-server=http://22.22.22.22:1111',#浏览器代理 配合某些中间人代理使用
# '--load-extension={}'.format(chrome_extension), # 加载插件
# '--disable-extensions-except={}'.format(chrome_extension),
# '--disable-extensions',
'--hide-scrollbars',
'--disable-bundled-ppapi-flash',
'--mute-audio',
'--no-sandbox', # 取消沙盒模式 沙盒模式下权限太小