asp实现的7xi音乐网的采集源代码(9)
'---歌手信息不存在时需要手动添加歌手
if rssinger.eof then
response.write "<br>select * from d_singer where singer_name='"&strsinger&"'"
response.write "<br><br>歌手不存在,需要手动操作添加。<br><br>请按以下要求添加歌手:<br><br>"
%>
<form action="addsinger.asp">
<input type="text" size="20" name="singer_name" value="<%=strsinger%>">
<input type="text" size="6" name="singer_first_name" value="姓" maxlength="3">
<select name="singer_sort" size="1"><%'%>
<%
set rssort = conn.execute("select * from s_sort ")
do while not rssort.eof and i < 10
%>
<option value="<%=rssort("id")%>"><%=rssort("sort_name")%></option><%'%>
<%
rssort.movenext
loop
rssort.close
set rssort = nothing
%></select>
<input type="submit" value="添加">
</form>
<%
CloseConn()
response.end
else '---歌手信息已存在,检查专辑信息是否需要入库
singerid = rssinger("id")
conn.execute("update d_singer set is_down=0 where id="&singerid)
response.write "<br><br>歌手信息正确,正在检查获取专辑信息 ...<br>"
set rsalbum = conn.execute("select * from d_album where album_singer="&singerid&" and album_name='"&stralbum&"'")
if rsalbum.eof then
str1 = split(strpicc,".")
str2 = str1(0)
sql="insert into d_album (album_singer,file_img,album_name,album_lang,album_corp,album_time,album_intro,add_time,is_down,album_7xi) values ('"&singerid&"','"&strpicc&"','"&stralbum&"','"&strlang&"','"&strcorp&"','"&strtime&"','"&strcontent&"','"&now&"',0,"&t7xiid&")"
conn.execute(sql)
'---采集保存专辑缩略图
okimg = GetRemoteFiles(v_7xipicc_url&strpicc,picc_FolderPath,str2)
内容版权声明:除非注明,否则皆为本站原创文章。