Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #If You Like This Share It Through Facebook and Twitter
- #Examples
- #URL To Media:http://sport-wallpaper.com/wallpaper/elektric-hd-desktop-theme.jpg
- #Name:Wallpaper.jpg
- #Alfa Version:YouTube Downloader
- #Ramesh Kavullapurayil
- #Greets To All Indian Hackers
- #TeamOpenFire
- #Indian Snakes Hackers
- #Coded32
- #Pivot, Toofan, Angeera, GreenBoy, Codesmasher,$p1|{3 B07,Parinda, Prabhjot,
- #Outsider,Hangslasher, Unhapy Stifler.
- #Connect Me FaceBook: www.facebook.com/ajithkp560
- #Twitter: www.twitter.com/ajithkp560
- #Advanced From Last Post
- import urllib
- print "MediaFile Saver"
- 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 To Media File:")
- url = url.replace("http://","")
- print "\nGive Name For Save. Eg. Music.mp3, Video.flv, etc."
- filename = raw_input("Name:")
- print ("\t\n\nSaving "+filename+".....")
- cobra = urllib.urlopen('http://'+url)
- files = open(filename, 'wb')
- meta = cobra.info()
- filesize = int (meta.getheaders ("Content-Length")[0])
- print "\t\nDownloading: %s Bytes: %s" % (filename, filesize)
- filesizedown = 0
- blocksize = 10000
- while True:
- buffer = cobra.read(blocksize)
- if not buffer:
- break
- filesizedown += len(buffer)
- files.write(buffer)
- percent = r"%10d [%3.2f%%]" % (filesizedown, filesizedown * 100. / filesize)
- percent = percent + chr (8)*(len(percent)+1)
- print percent,
- files.close()
- raw_input("\t\n\nDownload Complete...")
- except (KeyboardInterrupt, SystemExit):
- print "\t[x] Session cancelled"
Add Comment
Please, Sign In to add comment