Skip to main content

An extremely simple library used for gathering html from dynamic webpages using Pyppeteer.

Project description

Dynamic Html

This is a simple library to get the html of a dynamic webpage. It deals with all of the Pyppeteer code behind the scenes so you don't have to. It is also synchronous, so you don't have to mess with async functions.

Examples

from DynamicHtml import DynamicHtml

url = 'https://www.google.com'
content = DynamicHtml(url)

This returns the rendered html for this webpage

You can also execute Javascript code before retrieving the content like so:

from DynamicHtml import DynamicHtml

url = 'https://www.google.com'
script = '() => {window.scrollBy(0, document.body.scrollHeight);}'

content = DynamicHtml(url, script)

This will simply scroll to the bottom of the page using Javascript before retrieving the content. This could be useful to load specific lazily loaded elements and such.

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

DynamicHtml-1.0.3.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

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

DynamicHtml-1.0.3-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file DynamicHtml-1.0.3.tar.gz.

File metadata

  • Download URL: DynamicHtml-1.0.3.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for DynamicHtml-1.0.3.tar.gz
Algorithm Hash digest
SHA256 8f8f8964681a6cfe7d0df03b4fd20e5aa69f08f22a29905970b1567ca52ebc27
MD5 24ac6079cb5cfa4531a5ffca04e3c0c4
BLAKE2b-256 2d28098dc4135fb3585b97b0e16a1cb57843ba2782fb9f0d6964f118dcb24283

See more details on using hashes here.

File details

Details for the file DynamicHtml-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: DynamicHtml-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 2.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for DynamicHtml-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3662e0e727ba03b11df5443ad7938c73fd2163b19b64dac8670d8649ba4e2f13
MD5 7a6d7ecf55217efd8725ca391b03f8aa
BLAKE2b-256 2329d7a115d6cb875f44cc74f15c4d49e19e2575a0a7357439d5d82cd2e93322

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