ajithkp560

Media File Downloader

May 20th, 2012
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.39 KB | None | 0 0
  1. #If You Like This Share It Through Facebook and Twitter
  2.  
  3. #Examples
  4. #URL To Media:http://sport-wallpaper.com/wallpaper/elektric-hd-desktop-theme.jpg
  5. #Name:Wallpaper.jpg
  6.  
  7. #Connect Me FaceBook: www.facebook.com/ajithkp560
  8. #Twitter: www.twitter.com/ajithkp560
  9.  
  10. import urllib
  11. print "MediaFile Saver"
  12.  
  13. print "\n\n\t|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||"
  14. print "\t|||||                                                       |||||"
  15. print "\t|||||                                                       |||||"
  16. print "\t|||||        Coded By Ajith KP:::Coded By Ajith KP          |||||"
  17. print "\t|||||                                                       |||||"
  18. print "\t||||| [email protected]         [email protected] |||||"
  19. print "\t|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||"
  20.  
  21.  
  22. try:
  23.     url = raw_input("URL To Media:")
  24.     url =url.replace("http://","")
  25.     print "Give Name For Save. Eg. Music.mp3, Video.flv, etc."
  26.     filesave = raw_input("Name:")
  27.     print ("Saving "+filesave+".....")
  28.    
  29.     download = urllib.urlopen('http://'+url).read()
  30.    
  31.     save = open(filesave, 'wb')
  32.     save.write(download)
  33.     save.close()
  34.     print ("Saving "+filesave+" Complete.....")
  35. except Exception as wrong:
  36.     print ("Sorry, Saving "+filesave+" Not Completed")
  37. except (KeyboardInterrupt, SystemExit):
  38.     print "\t[x] Session cancelled"
Add Comment
Please, Sign In to add comment