0

This is a program using the urllib module to find the (html/any client-side script) source code of any website which exists.
Have fun!

Edited by HTMLperson5

import urllib
sourcecode = urllib.urlopen("http://www.any-website.com").read() #Replace any-website with whatever you like
print sourcecode
2
Contributors
1
Reply
6
Views
4 Years
Discussion Span
Last Post by M.S.
1

if you want it to work with every site,I guess you need to consider the encoding too:

print sourcecode.decode("utf8")

Edited by M.S.

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.