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.1.tar.gz
(1.9 kB
view hashes)
Built Distribution
Close
Hashes for DynamicHtml-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f61ef50aef43d188bdbb8ae27c8695ddbac9465184c2bcc364f9fa27ca903a8 |
|
MD5 | 784697eb964a9033a6836e950e0cebf1 |
|
BLAKE2b-256 | 03b01248dfbb056f9b116c64b345324bf17067d9795edd21f7f91bab64cd20c5 |