python-readability
Given a html document, it pulls out the main body text and cleans it up.
This is a python port of a ruby port of arc90’s readability project.
python-readability可以获取一个HTML文献的主体内容:
gIthub:https://github.com/buriy/python-readability
pypi:https://pypi.org/project/readability-lxml/
Installation
:pip3 install readability-lxml
Collecting readability-lxml
Downloading https://files.pythonhosted.org/packages/af/a7/8ea52b2d3de4a95c3ed8255077618435546386e35af8969744c0fa82d0d6/readability-lxml-0.7.1.tar.gz
Collecting chardet
Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
|████████████████████████████████| 143kB 412kB/s
Requirement already satisfied: lxml in /usr/local/lib/python3.7/site-packages (from readability-lxml) (4.5.0)
Requirement already satisfied: cssselect in /usr/local/lib/python3.7/site-packages (from readability-lxml) (1.1.0)
Building wheels for collected packages: readability-lxml
Building wheel for readability-lxml (setup.py) ... done
Created wheel for readability-lxml: filename=readability_lxml-0.7.1-cp37-none-any.whl size=16481 sha256=acfc6743aa167f8db937221c4a5b033352524d70d7cde13bdb98724b66467a74
Stored in directory: /Users/lurongming/Library/Caches/pip/wheels/94/48/e5/d944e616d8b0734c3b9cf30a21f4afcf855a1e2b85f82f34fb
Successfully built readability-lxml
Installing c