bash command to convert html page to a text file

前端 未结 10 1165
醉梦人生
醉梦人生 2020-12-09 07:38

I am a beginner to linux. Would you please help me how to convert an html page to a text file. the text file will remove any images and links from the webpage. I want to use

10条回答
  •  自闭症患者
    2020-12-09 08:21

    Easiest way is to use something like this which the dump (in short is the text version of viewable html)

    remote file

    lynx --dump www.google.com > file.txt
    links -dump www.google.com
    

    local file

    lynx --dump ./1.html > file.txt
    links -dump ./1.htm
    

提交回复
热议问题