本帖最后由 shano 于 2010-11-24 18:36 编辑
我是菜鸟 代码 很乱#include<array.au3>
#include<ie.au3>
Dim $HTMLSource
_get('http://lrc.aspxp.net/?k=%BA%C9%CC%C1&st=ti')
;FileWrite('c:\1.txt',$HTMLSource)
$sR = StringRegExp($HTMLSource, '="red">(.+?)</', 3)
$song1=$sR[1]
$sR = StringRegExp($HTMLSource, '</span>(.+?)</a>', 3)
$song2=$sR[1]
MsgBox(0,"歌名",$song1&" "&$song2)
$sR = StringRegExp($HTMLSource, '歌手:.+?>(.+?)</a>', 3)
$songer=$sR[1]
MsgBox(0,"歌手",$songer)
$sR = StringRegExp($HTMLSource, 'a href="lrc.asp(.+?)" target="_blank">LRC格式', 3)
$LRC=$sR[1]
MsgBox(0,"LRC格式下载地址",'www.***.com/lrc.asp'&$LRC)
Func _get($url)
$httpObj = ObjCreate("winhttp.winhttprequest.5.1")
$httpObj.open("GET", $url)
$httpObj.Send()
$HTMLSource = BinaryToString(($httpObj.responseBody) ,1 )
EndFunc
|