asp实现的7xi音乐网的采集源代码(13)
'---目标页面
url = v_7xiplay_url&t7xiid&".htm"
set httpobj = server.createobject("paopao.http")
Err.Clear
on error resume next
response.write "<br>"&url
str = httpobj.get(url)
if Err = 0 then '---读取目标页面正常时的处理
'----歌曲文件名及文件夹
str0 = split(str,"<param name='src' value='"&chr(34)&"+s_list+"&chr(34))
str1 = split(str0(1),"'>")
filerm = str1(0)
response.write "<br>文件名 - "& filerm
tmpurl = v_7ximp3_url & filerm
response.write "<br>目标源 - "& tmpurl
'---需要保存音乐文件到本地时,采集保存音乐文件
if is_getrm then
str0 = split(filerm,"/")
i = 0
do while i < Ubound(str0)
tmpfolder = mp3_FolderPath & str0(i)
if not CheckFolder(tmpfolder) then MakeNewsDir tmpfolder
i = i + 1
loop
response.write "<br>保存为 - "& tmpfolder & "\" & str0(Ubound(str0))
okrm = GetRemoteFiles(tmpurl,tmpfolder,replace(str0(Ubound(str0)),".rm",""))
else
response.write "<br><font color=red>请注意 - </font>RM文件配置为不保存!!!!!!!!!!"
end if
'---歌词采集
tmp_url = "http://www.7xi.net/showword.asp?id=" & t7xiid
response.write "<br>"&tmp_url
内容版权声明:除非注明,否则皆为本站原创文章。