1
sudo wget -O /home/KrypticRelic/Desktop/DefaultAccess.txt  phenoelit.org/dpl/dpl.html

This prints out a significant amount of padding for the actual text that I'd like.

Ex.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html><head><title>Default Password List</title></head>
<body bgcolor="#000000" link=#FF6600   vlink=#CC6600 alink=#FFFF00 text=#FF9900 >
<CENTER><H1>Default Password List</H1><h2>2007-07-03 </h2>

<TABLE FRAME=VOID CELLSPACING=0 COLS=47 RULES=NONE BORDER=0>
    <COLGROUP><COL WIDTH=177><COL WIDTH=348><COL WIDTH=472><COL WIDTH=292><COL WIDTH=150><COL WIDTH=399><COL WIDTH=429><COL WIDTH=841><COL WIDTH=34><COL WIDTH=94><COL WIDTH=66><COL WIDTH=208><COL WIDTH=48><COL WIDTH=48><COL WIDTH=45><COL WIDTH=51><COL WIDTH=86><COL WIDTH=34><COL WIDTH=79><COL WIDTH=71><COL WIDTH=208><COL WIDTH=48><COL WIDTH=41><COL WIDTH=41><COL WIDTH=40><COL WIDTH=86><COL WIDTH=34><COL WIDTH=59><COL WIDTH=66><COL WIDTH=208><COL WIDTH=48><COL WIDTH=48><COL WIDTH=65><COL WIDTH=40><COL WIDTH=86><COL WIDTH=34><COL WIDTH=74><COL WIDTH=171><COL WIDTH=86><COL WIDTH=45><COL WIDTH=48><COL WIDTH=48><COL WIDTH=51><COL WIDTH=119><COL WIDTH=28><COL WIDTH=64><COL WIDTH=71></COLGROUP>
    <TBODY>
        <TR>
            <TD WIDTH=177 HEIGHT=17 ALIGN=LEFT>Vendor</TD>
            <TD WIDTH=348 ALIGN=LEFT>Model</TD>
            <TD WIDTH=472 ALIGN=LEFT>Version</TD>
            <TD WIDTH=292 ALIGN=LEFT>Access Type</TD>
            <TD WIDTH=150 ALIGN=LEFT>Username</TD>
            <TD WIDTH=399 ALIGN=LEFT>PASSWORD</TD>
            <TD WIDTH=429 ALIGN=LEFT>Privileges</TD>
            <TD WIDTH=841 ALIGN=LEFT>Notes</TD>

How do I remove the HTML and keep the lists? The site is provided above so you can see what I am talking about.

  • 1
    Does e command work differently without the sudo? A small piece of general advice is not to use sudo unless you need to. – Scott Sep 16 '17 at 18:07
  • Thanks, just starting out but I remember that as a rule of thumb - appreciate the refresher. – Timothy W. Times Sep 17 '17 at 19:01
1

To download with html removed, use links (or lynx) with the -dump option:

links -dump http://website.web

Or:

lynx -dump http://website.web

The two differ in output style. For one, lynx will format hyperrefs while links will ignore them.

Installation

On a debian/ubuntu-like system, either program can be installed with apt-get:

apt-get install links

apt-get install lynx
  • The links function works and does exactly what I asked. The Lynx, however, does the same as wget. I tried both but removed Lynx since I have wget. Appreciate the quick response. – Timothy W. Times Sep 16 '17 at 18:09
  • @TimothyW.Times I'm glad that links -dump works for you. I'm surprised about lynx -dump as I use it frequently for this purpose but maybe you have a different version or patch level. In any event, links produces less formatting in the output and that sounds like what you prefer anyway. – John1024 Sep 16 '17 at 18:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.