| 1 |
Source: html-text |
| 2 |
Section: python |
| 3 |
Priority: optional |
| 4 |
Maintainer: Christian Marillat <[email protected]> |
| 5 |
Homepage: https://github.com/zytedata/html-text |
| 6 |
Rules-Requires-Root: no |
| 7 |
Standards-Version: 4.7.0 |
| 8 |
Build-Depends: debhelper-compat (= 13), dh-sequence-python3, python3, |
| 9 |
python3-setuptools, pybuild-plugin-pyproject, python3-hatchling, |
| 10 |
python3-lxml, python3-pytest, python3-lxml-html-clean, |
| 11 |
|
| 12 |
Package: python3-html-text |
| 13 |
Architecture: all |
| 14 |
Depends: ${python3:Depends}, ${misc:Depends}, |
| 15 |
Description: extract text from HTML. |
| 16 |
How is html_text different from .xpath('//text()') from LXML or .get_text() |
| 17 |
from Beautiful Soup ? |
| 18 |
. |
| 19 |
* Text extracted with html_text does not contain inline styles, |
| 20 |
javascript, comments and other text that is not normally visible to |
| 21 |
users; |
| 22 |
* html_text normalizes whitespace, but in a way smarter than |
| 23 |
.xpath('normalize-space()), adding spaces around inline elements (which |
| 24 |
are often used as block elements in html markup), and trying to avoid |
| 25 |
adding extra spaces for punctuation; |
| 26 |
* html-text can add newlines (e.g. after headers or paragraphs), so that |
| 27 |
the output text looks more like how it is rendered in browsers. |