Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #it will create source.html in the same directory
- import urllib
- import httplib
- import socket
- print "\n\nFast Webpage Saver"
- print "input URL and run it. It will Save Webpage Within Seconds"
- print "\n\n\t|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||"
- print "\t||||| |||||"
- print "\t||||| |||||"
- print "\t||||| Coded By Ajith KP:::Coded By Ajith KP |||||"
- print "\t||||| |||||"
- print "\t||||| [email protected] [email protected] |||||"
- print "\t|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||"
- try:
- url = raw_input("URL:")
- url = url.replace("http://","")
- txt = open('savedpage.html','w')
- cobra = urllib.urlopen('http://'+url)
- for source in cobra.readlines():
- print source.rstrip()
- txt.write(source.rstrip())
- txt.close()
- cobra.close()
- raw_input('Complete: Open savedpage.html')
- except (httplib.HTTPResponse, socket.error):
- print "\n\t[!] Session Cancelled; Error occured. Check internet settings"
- except (KeyboardInterrupt, SystemExit):
- print "\t[x] Session cancelled"
Advertisement
Add Comment
Please, Sign In to add comment