Downloaded webpage looks different than the original webpage
Question: I am thinking of downloading [cplusplus.com's C
library](http://www.cplusplus.com/reference/clibrary/) by using Python. I want
to download it completely and then convert it into a linked document such as
Python documentation. This is my initial attempt at downloading the front
page.

    
    
    #! python3
    import urllib.request
    
    filehandle = urllib.request.urlopen('http://www.cplusplus.com/reference/clibrary/')
    
    with open('test.html', 'w+b') as f:
        for line in filehandle:
            f.write(line)
    
    filehandle.close()
    

The front page is being downloaded correctly but its look is quite different
than in the original webpage. By different look I mean that the nice looking
formatting on the original webpage is gone after I ran the script to download
the webpage.

What's the reason for this?

* * *

Can someone explain the downvotes? What's the problem? Newbie questions not
allowed?


Answer: This occurs because your scraped version doesn't include the Cascading Style
Sheets (CSS) linked to by the page. It also won't include any images or
javascript linked to either. If you want to obtain the linked files, you'll
have to parse the source code you scrape for them.

