Skip to main content

use playwright to render html page into pictures.

Project description

Hpic

对Playwright进行封装,利用无头Chrome/Firefox进行网页截图实现图片渲染。

内置了Chrome线程池管理和Jinja2模板渲染支持,原生异步渲染。

安装

pip install hpic

使用

import asyncio
from hpic import Hpic

h = Hpic()
asyncio.run(h.render("https://www.github.com", data={}, output="github.png"))

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

hpic-0.1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

hpic-0.1.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file hpic-0.1.0.tar.gz.

File metadata

  • Download URL: hpic-0.1.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.20.1 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for hpic-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5b160af2e6e58e30b7c1d35a10efa50b44186d042bb6b440ce88c8f05356a20d
MD5 04828da8dcfe3d8e3736fd56e7ce2fef
BLAKE2b-256 0d4542625174eb4ccbb5e3a2f113184c82fa7319174ce70f91e1dab7b501ef0c

See more details on using hashes here.

File details

Details for the file hpic-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hpic-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.20.1 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for hpic-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0b1328655feed0497f9ae8f7d67859085ef7423a95e8a6c4a8763db78f6f42c5
MD5 d7c0f58560a5d7dff75c67d23993e221
BLAKE2b-256 b38fb3d641d07c91e6395a394b5956c8d7f3c3165f418f25c093babc09a924b0

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