Web Content Extractor
Librería Python para descargar páginas web y obtener HTML, texto visible y enlaces absolutos. HTTP es el transporte predeterminado y Playwright permite renderizar páginas con JavaScript.
Requisitos
- Python 3.13+
- uv
Instalación
uv sync
Para usar Chromium como fallback ante respuestas HTTP 403/503 o para renderizar páginas directamente, instala el navegador:
uv run playwright install chromium
Uso
import asyncio
from web_content_extractor import WebContentClient, extract_links
async def main():
client = WebContentClient(max_chars=8_000)
page = await client.fetch("https://example.com")
print(page.url) # URL final después de redirecciones
print(page.text) # Texto visible compacto
print(len(page.html))
for link in extract_links(page.html, page.url):
print(link.text, link.url)
asyncio.run(main())
fetch(url, use_browser=True) abre directamente Chromium. Por defecto, se usa HTTP y se intenta una vez el navegador ante HTTP 403/503. No se evaden bloqueos ni verificaciones anti-bot.
Metadata
Release files for web-content-extractor 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| web_content_extractor-0.2.0.tar.gz | 5.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| web_content_extractor-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.5 kB
Release files / web_content_extractor-0.2.0.tar.gz
| Download URL | web_content_extractor-0.2.0.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
954ba4fe49295b5de1466b873d672be50406c90b5ed7f18005b578e9f7312dbf
|
|
BLAKE2b-256 checksum How to use checksums |
854903a84b09238623f96252a8adb35833aba753e7133b1ef74e979c256a6f97
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.
Transparency logRelease files / web_content_extractor-0.2.0-py3-none-any.whl
| Download URL | web_content_extractor-0.2.0-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7137e957b1cbd2ef5ec2a23453081fbcbba0bedfde3fe89fbbad04f28b4ba0b8
|
|
BLAKE2b-256 checksum How to use checksums |
180d51f228f1e5fac7b5285f7a5d64b490cbcfdb60b31f52a0218cb5d90523b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.
Transparency log