Skip to main content

一个`playwright`实例,支持`cookie`、自动代理(白名单)、远程调试、设定加载内容

Project description

browser

一个playwright实例,支持cookie、自动代理(白名单)、远程调试、设定加载内容

示例

from lzhbrowser import Browser
import asyncio

async def main():
    browser = await Browser.create(
        headless=False,
        proxy= {"server": "socks5://127.0.0.1:1080"},
        logging_level=logging.DEBUG)
    white_list:set[str] = {
        "*.dmm.com",
        "*.dmm.co.jp",
        "www.prestige-av.com",
        "www.mgstage.com"
    }
    browser.white_list_update(white_list)
    content = await browser.fetch("https://video.dmm.co.jp/")
    content2 = await browser.fetch("https://www.google.com")
    await asyncio.sleep(10)
    await browser.close()
asyncio.run(main())

安装 - PyPI

pip install lzhbrowser

API

Document

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lzhbrowser-0.1.2.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lzhbrowser-0.1.2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file lzhbrowser-0.1.2.tar.gz.

File metadata

  • Download URL: lzhbrowser-0.1.2.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for lzhbrowser-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c00c706cc1f8969065ed0f96181291038b04414394c038209a3e4c5fb13f2e1e
MD5 c3c8fb3eb700b00f952a6ceadb62cf00
BLAKE2b-256 f47a2447ccbb4e5693dccccce95bf596671703106abff32578c8afd7e637d50a

See more details on using hashes here.

File details

Details for the file lzhbrowser-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: lzhbrowser-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for lzhbrowser-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 82f7c5590e7c23e78436c4b49e0463c96829d54d5d22dcd0c90a02f71e3a2508
MD5 99984c904f8066d7b02e54978399cd76
BLAKE2b-256 5e656ea197e13a0fea16cfd52c6c109b5a045c35de7cd80295aa0245e42b2baa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page