Help convert dynamic webistes to static ones.
Project description
Geler
Help convert dynamic websites to static ones.
Install
pip install geler-CERTIC
Usage
As a library in your own program:
from geler import freeze
result = freeze("https://acme.tld/", "/path/to/local/dir/", thread_pool_size=1, http_get_timeout=30)
for err in result.http_errors:
logger.error(
f'status {err.get("status_code")} on URL {err.get("url")}. Contents below:\n{err.get("content")}'
)
As a CLI tool:
$> geler --help
usage: geler [-h] [-t THREAD_POOL_SIZE] [--http-get-timeout HTTP_GET_TIMEOUT] start-from-url save-to-path
positional arguments:
start-from-url -
save-to-path -
optional arguments:
-h, --help show this help message and exit
-t THREAD_POOL_SIZE, --thread-pool-size THREAD_POOL_SIZE
1
--http-get-timeout HTTP_GET_TIMEOUT
30
Why ?
For MaX and associated tools, we needed a lightweight, portable, pure Python solution to convert small dynamic websites to static ones.
Alternatives
This tool has a narrow scope, on purpose. Please turn to these solutions if you need more:
Limitations
- only works with HTTP GET
- does not submit forms (even with GET method)
- only considers URLs in
src
orhref
attributes - only considers URLs with
http
orhttps
schemes - only downloads what is in the same netloc (same domain, same port) as the start URL
- only patches URLs in
*.html
files and*.css
files, not*.js
files. - does not throttle requests
- does not respect
robots.txt
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
geler_certic-0.2.3.tar.gz
(5.1 kB
view details)
Built Distribution
File details
Details for the file geler_certic-0.2.3.tar.gz
.
File metadata
- Download URL: geler_certic-0.2.3.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.0 CPython/3.9.4 Darwin/24.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13ffe547ad8434c9a5599e09304becf15cbc8350db04beff7c72fe7144241faf |
|
MD5 | 6d1965326536cb50e1b0fb8efeddc2b7 |
|
BLAKE2b-256 | 7d94c3d9aeb05d6ea9a521b92e44c0e6200bfe195492c02b1386b47435140b29 |
File details
Details for the file geler_certic-0.2.3-py3-none-any.whl
.
File metadata
- Download URL: geler_certic-0.2.3-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.0 CPython/3.9.4 Darwin/24.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93b86faf45782608cb0c2951d3f3ea8a1c6c1589a27d4615deb71c0248af9866 |
|
MD5 | 3b57d76fd6d327d52c4e14983e27aac4 |
|
BLAKE2b-256 | fb29f1a65a9e44a87c55cb64fd1b9a48c2b0e23558f19f42729595863689d066 |