You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.5 KiB
1.5 KiB
python-readability-lxml with w3m web browser
Given a html document, it pulls out the main body text and cleans it up.
- tutorial video: Link
install requirements
pip install readability-lxml
basic commandline usage
python3 -m readability.readability -h
python3 -m readability.readability -u 'https://www.servethehome.com/amd-psb-vendor-locks-epyc-cpus-for-enhanced-security-at-a-cost/' > output.html
configuration
vim ~/.w3m/keymap
keymap L NEXT
keymap H PREV
keymap \\\R COMMAND "SHELL 'python3 -m readability.readability -u $W3M_URL > /tmp/readability.html' ; LOAD /tmp/readability.html"
usage
press \R on a webpage while running w3m web browser
references
- W3M playlist https://www.youtube.com/playlist?list=PLqv94xWU9zZ35Yv0s6zMID5JoS8qu19Kh
- https://pypi.org/project/readability-lxml/
- https://aur.archlinux.org/packages/python-readability-lxml/
- https://youtu.be/qPiE1JUgsBg
contact
_ _ _ _
__ _ ___ | |_| |__ | | ___| |_ _ _
/ _` |/ _ \| __| '_ \| |/ _ \ __| | | |
| (_| | (_) | |_| |_) | | __/ |_| |_| |
\__, |\___/ \__|_.__/|_|\___|\__|\__,_|
|___/