python to crawl a webpage and save it. And the code works properly. But when I open the web page it just shows the website name i.e., http://www.indiabix.com and not the actual content.
You can just go the website and save one of it's pages NOT the homepage but other pages like http://www.indiabix.com/database/questions-and-answers/. And when you open it, the page just shows this
and not this
The code I've written is simple
def writeToFile(link, name, title): response = urllib2.urlopen(link) webContent = response.read() f = open(name + '/' + title, 'w') f.write(webContent) f.close
You just pass the link, directory name and title of file.
I have checked in Chrome, Firefox and Safari and all show the same output. How can I resolve this issue to display the entire saved page fully.