0

I've using python to retrieve the source code from a URL, however the URL in question has scripts that evaluate upon the loading of the page. As a result the body of the html returned is empty when using python, but when i visit the webpage manually it shows all kinds of posts in the body of the html code. Is there a way to force it to populate and evaluate the html?

In short when I use the file > Save button in Chrome on an HTML page, the resulting html code does not match the HTML saved using python. How can i resolve this?

f = urllib2.urlopen(url)
html = f.read()
JokerMartini
  • 5,674
  • 9
  • 83
  • 193

1 Answers1

0

What you need to use is a web browser tool that can interpret javascript just like this one :splinter

FrenchTechLead
  • 1,118
  • 3
  • 13
  • 20