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.3.tar.gz (5.5 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.3-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lzhbrowser-0.1.3.tar.gz
  • Upload date:
  • Size: 5.5 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.3.tar.gz
Algorithm Hash digest
SHA256 6f856c4d8010498fab347bce0dd0494af4c883759393ffe21d5b590c1146019e
MD5 095f0e30aa68c0475efde70a5424c3bd
BLAKE2b-256 a2adf4c038bf2901e2ec842843d251efc8ee6cea8ac6597b998639336547dd6e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lzhbrowser-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.8 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 390e9147ef464c563afbce25394ba4c836434283b1cf125d237af35e6e0a7eca
MD5 c55c0b926070473814c5f1323df0bde8
BLAKE2b-256 7d83f10c388c77950e4e5838093b6da61d57c44f4229591de136d2387b77b746

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