w3m readability mode by site and url using css selectors
NapoleonWils0n
w3m strip out the junk the web pages using css selectors with html-xml-utils by site and url to select exactly what you want from a web page without any junk
using w3m siteconfig we intercept urls and redirect them to a cgi script which uses hxselect to select a section of a web page using a css selector, which we get by using firefox and the inspect element picker to select part of a webpage and get the css selector
we then use hxprune to remove any other html we dont want in our selection using css selectors, then we pipe that into sed to convert the links into absolute urls redirect the output to a html page in /tmp and then open the page with w3m
with only the part of the page you selected with css selectors, this technique is perfect for cleaning up search results, and also works per url per site
html-xml-utils install: sudo apt install html-xml-utils
w3m siteconf: https://github.com/NapoleonWils0n/ubuntu-dotfiles/blob/master/.w3m/siteconf
bbc iplayer search cgi script: https://github.com/NapoleonWils0n/ubuntu-dotfiles/blob/master/.w3m/cgi-bin/bbc-search.cgi
bbc iplayer episodes cgi script: https://github.com/NapoleonWils0n/ubuntu-dotfiles/blob/master/.w3m/cgi-bin/bbc-episodes.cgi
surfraw iplayer elvi: https://github.com/NapoleonWils0n/ubuntu-dotfiles/blob/master/.config/surfraw/elvi/iplayer ... https://www.youtube.com/watch?v=prZC-e9QZDw
173263212 Bytes