DynamicHtml-1.0.3
توضیحات
An extremely simple library used for gathering html from dynamic webpages using Pyppeteer.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | DynamicHtml-1.0.3 |
| نام | DynamicHtml |
| نسخه کتابخانه | 1.0.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Kestrel |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/commonkestrel/DynamicHtml |
| آدرس اینترنتی | https://pypi.org/project/DynamicHtml/ |
| مجوز | MIT |
# 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
```python
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:
```python
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.
نیازمندی
| مقدار | نام |
|---|---|
| - | pyppeteer |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >= 3.4 | Python |
نحوه نصب
نصب پکیج whl DynamicHtml-1.0.3:
pip install DynamicHtml-1.0.3.whl
نصب پکیج tar.gz DynamicHtml-1.0.3:
pip install DynamicHtml-1.0.3.tar.gz