A simple package to extract text from (even broken/invalid) HTML. No dependencies, it just uses Python's internal HTMLParser with a few tweaks.
Usage:
from html_stripper import strip_tags
text = strip_tags("<html>…")
from html_stripper import strip_tags
import requests
strip_tags(requests.get("https://foo.bar/").text)
from html_stripper import strip_tags, strip_multiple_newlines
text = strip_multiple_newlines(strip_tags("<html>…")) # replaces chained newlines with a single \n
Release files for html-stripper 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| html_stripper-0.3.tar.gz | 15.2 kB | Details |
Release files / html_stripper-0.3.tar.gz
| Download URL | html_stripper-0.3.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b9ea66bc75d00adc06447f3c3a278899c10cf12fad0c0faab39457057b4056b9
|
|
BLAKE2b-256 checksum How to use checksums |
21e0c6b141679eed08bb139a7a82f36ed30336b15d69c9b2c4a735549a53efad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.11
|