asp实现的7xi音乐网的采集源代码(15)
lyric = replace(lyric,"<font style=color:#e10900>","")
lyric = replace(lyric,"</font>","")
else
lyric = "暂时还没歌词"
end if
end if
response.write "<br>歌词 - "&lyric
'---将采集到的信息更新到数据库
if is_getrm then
conn.execute("update d_mp3 set file_rm='"&filerm&"',mp3_lyric='"&lyric&"',is_down='1' where id="&id)
else
conn.execute("update d_mp3 set file_rm='"&filerm&"',mp3_lyric='"&lyric&"',is_down='0' where id="&id)
end if
else '---读取目标页面出错时的处理
conn.execute("update d_mp3_t set file_rm='nourl',is_down='1' where id="&id)
response.write "<br><br><font color=red><b>错误:</b>获取目标页面错误,请检查:"& url &"</font>"
response.end
end if
rssong.movenext
loop
rssong.close
set rssong = nothing
CloseConn()
'---继续检测采集下一批歌曲信息
response.write "<br>正在检测下一批歌曲信息 ...<br><br>"
response.write "<meta http-equiv=refresh content=""0 ; url=getrm.asp"">"
end if
%>
</body>
</html>
数据库表的SQL脚本:
数据库表
程序代码
s_sort ----歌手分类表
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[s_sort]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[s_sort]
GO
Create TABLE [dbo].[s_sort] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
内容版权声明:除非注明,否则皆为本站原创文章。