A simple Selenium-based webpage fetcher for fully rendered HTML
Project description
Introduction
load_url is a lightweight Python utility that automates webpage loading and HTML extraction using Selenium. It waits for a specific CSS class to appear on the page—ensuring the content is fully rendered—before saving the final HTML to a file. This makes it ideal for scraping dynamic sites, debugging frontend rendering, or capturing snapshots of JavaScript-heavy pages. The tool supports headless mode for background usage and works seamlessly with Firefox through Geckodriver.
Features
- Loads webpages using selenium
- Waits for the specified class to load before fetching the webpage
- saves the enitre rendered HTML to the specified file location
- Supports Headless mode so to open and read the page in an invisible NON UI browser to save on Memory and Graphic Resources
Installation
Install using the following pip command:
pip install bel_webpage_class_fetcher
Requirements
- python 3.7+
- firefox
- geckodriver
- INTERNET (!!!)
- Highly Reccomended to use Virtual Enviornment
Usage
- import the library using
from bel_webpage_class_fetcher import load_url
Parameters:
url: str -> The URL of the webpage to be loaded
wait_for_class -> the name of the class to wait for to load before downloading
output_file_name: str -> the filepath where the HTML will be stored
driver_path: str -> the path to the geckodriver (recommend full path)
headless: bool -> flag to specify wheather to opne the browser window or not
Example Output
~ Imagine a fully rendered HTML page~
Troubleshooting
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bel_webpage_class_fetcher-0.0.1.tar.gz.
File metadata
- Download URL: bel_webpage_class_fetcher-0.0.1.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13c95f67d0d2415d608505216344c8bd20197f94a142e4bc0ad37f29fe198f75
|
|
| MD5 |
66606babf8d4b10c95e0ab1832a970ba
|
|
| BLAKE2b-256 |
ac1cf737c4634dfec684f3619ba17c4d96ddedea4a8c255207e7e7af90f51196
|
File details
Details for the file bel_webpage_class_fetcher-0.0.1-py3-none-any.whl.
File metadata
- Download URL: bel_webpage_class_fetcher-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e52edeab54ff49f3efdaa12615dcf2f35e94121d4f63ffcec777ff460fb764f5
|
|
| MD5 |
a69b8ec1dc77b12b9ffb090a38e495f8
|
|
| BLAKE2b-256 |
77830371e3c43e3426df5c4433704ac596ac48b8f94629742cf6a870bbb03537
|