elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Entrar al Canal Oficial Telegram de elhacker.net


  Mostrar Mensajes
Páginas: [1]
1  Programación / Scripting / Re: Descargar mp3's desde Goear [vbscript] en: 9 Septiembre 2009, 01:15 am
Buenas, estaba nuscando un script que averiguara la url real donde se aloja el archivo mp3, y la verdad que este es bastante simple pero eficaz, aunque ahora que estoy viendo los links de goear, veo que hay links del tipo

http://www.goear.com/listen/xxxx/nombre-de-la-cancion

y claro, el script no soporta este tipo de enlaces, por lo que habría que convertirlo un poco, quitar el nombre del final y cambiar /listen/xxxx por listen.php?v=xxxx

Me he permitido modificar un poquito el inicio del script para que soporte este tipo de enlaces. el script quedaría de la siguiente forma:

Código:
'by Novlucker
Song = inputbox("Ingrese la dirección del tema a descargar..."& chr(13) & "Ejemplo: http://www.goear.com/listen.php?v=a2840d6","Goear Downloader")

'------------------------------------------------------------------------------
'Trozo modificado
Song = LCase(Song)
If InStr(Song, "v=") = 0 Then
  If InStr(Song, ".com/listen/") > 0 Then
    Tmp = Mid(Song, InStr(Song, ".com/listen/") + 12)
    Tmp = Mid(Tmp, 1, InStr(Tmp, "/") - 1)
    Song = "http://www.goear.com/listen.php?v=" & Tmp
  End If
End If
'------------------------------------------------------------------------------



Equal = instr(Song,"=")
UrLXml = mid(Song,Equal+1,len(Song)-Equal)
'Obtenemos el identificador del tema
 
change = "http://www.goear.com/files/xmlfiles/"
UrLXml = change & left(UrLXml,1) & "/secm" & UrLXml & ".xml"
'Generamos la url modificada
 
set objxml = CreateObject("Microsoft.XMLHTTP")
objxml.Open "GET",UrLXml,0
objxml.Send()
 
xmlcontent = objxml.responsetext
'Obtenemos el texto del xml
 
fpath = instr(xmlcontent,"http://")
lpath = instr(fpath,xmlcontent,"""")
'Buscamos dentro del xml la posicion de algunos caracteres
 
mp3path = mid(xmlcontent,fpath,lpath-fpath)
'Extraemos la direccion del tema
 
set objbrowser = createobject("internetexplorer.application")
objbrowser.navigate mp3path
'Navegamos hasta la direccion
 
On error resume next
 
Do While objbrowser.Busy
WScript.Sleep 200
Loop
 
objbrowser.quit
'Salta la ventana de descarga y terminamos el objeto del iexplorer

Un saludo

Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines