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.2.tar.gz (1.9 kB view hashes)

Uploaded Source

Built Distribution

DynamicHtml-1.0.2-py3-none-any.whl (2.2 kB view hashes)

Uploaded Python 3

Supported by

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