How can I reach to source code of a web page with python ?
I use these code block but it doesn't work perfectly. If I open the html file(site.html) on a web browser, some characters disapper.
import urllib.request
req = urllib.request.Request('https://www.google.com')
response = urllib.request.urlopen(req)
the_page = response.read()
a = open('site.html', 'w+')
a.write(str(the_page))
a.close()