Descripción: Script python que nos permite descargar mp3 por media de mp3Skull.
Autor: Doddy
#!usr/bin/python #MP3 Downloader 0.1 #Coded By Doddy H import sys,urllib,urllib2,re,os,urlparse def toma(web) : nave = urllib2.Request(web) nave.add_header('User-Agent','Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5'); op = urllib2.build_opener() return op.open(nave).read() def head(): print """ @ @ @@@@@ @@@ @@@@ @@@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @@ @ @@ @@ @ @ @ @ @ @ @ @ @ @ @@ @ @@ @@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @@@@@ @@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @@ @ @ @ @ @ @ @ @ @ @ @ @ @ @@ @ @ @ @@@ @@@@ @@@@ @ @ @ @ Coded By Doddy H """ def copyright(): print "\n\n(C) Doddy Hackman 2012\n" raw_input() sys.exit(1) def proxar(a,b,c): sys.stdout.write("\r[+] Status : %s / %s" % (a * b,c)) def down(file,filesave): print "\n[+] File to download : "+filesave+"\n" try: urllib.urlretrieve(file,filesave,reporthook=proxar) except: print "\n[-] Error\n" copyright() print "\n\n[+] File Download in "+os.curdir+"/"+filesave def buscar(titulo) : songs = [] datas =[] links = [] datas_back = [] links_back = [] titulo = re.sub(" ","_",titulo) print "\n\n[+] Searching ...\n" code = toma("http://mp3skull.com/mp3/"+titulo+".html") if not (re.findall("Sorry, no results found for",code)): songs = re.findall("(.*)<\/b><\/div>",code) datas_back = re.findall("\s+(.*?)<\/div>",code) links_back = re.findall(""," ",datac) datas.append(datac) for li in links_back : lic = li+".mp3" links.append(lic) try: for counter in range(0,len(songs)): print "\n[Song "+str(counter)+"] : "+songs[counter] print "[Data] : "+datas[counter] print "[Link] : "+links[counter] except: pass while 1: num = raw_input("\n[?] Number :") if num == "exit": print "\n\n[+] Finished\n" copyright() num = int(num) down(links[num],os.path.basename(links[num])) else: print "\n[-] Not Found\n"; if not os.path.isdir("mp3_downloads"): os.makedirs("mp3_downloads") os.chdir("mp3_downloads") head() bs = raw_input("\n\n[?] Song : ") buscar(bs) copyright() #The End ?
0 comentarios:
Publicar un comentario