当前位置:编程学习 > C#/ASP.NET >>

求助高手根据此代码写一个定时采集程序,有偿!!

求助高手根据此代码写一个定时采集在程序,有偿!!有意者与我联系: QQ:624237228

样例程序如下:
如有那位高手帮忙详细注释一下,不胜感激:
Dim wstr1,i
wstr1=getHTTPPage("http://www.ywnews.cn/ywxw/index.htm")
i=0
If instr(wstr1,"◎ <A class=bt_content")>0 Then
wstr1=mid(wstr1,instr(wstr1,"◎ <A class=bt_content"))
wstr1=mid(wstr1,1,instr(wstr1,"<td align=right colspan=2>")-16)
wstr1=replace(wstr1,vbCrlf,"")
wstr1=replace(wstr1,"""","'")
wstr1=replace(wstr1," class=bt_content","")
wstr2=split(wstr1,"</td></tr><tr><td>")
i=ubound(wstr2)
If i > 5 Then
i=5
End If
End If
For j = 0 to i
wstr3=mid(wstr2(j),instr(wstr2(j),"href='")+len("href='"))
wstr3=mid(wstr3,1,instr(wstr3,"' target='_blank'")-1)
wstr4=mid(wstr2(j),instr(wstr2(j),"target='_blank'>")+len("target='_blank'>"))
wstr4=mid(wstr4,1,instr(wstr4,"</A>")-1)
If Cn.execute("Select count(id) from [G_News] where Topic = '"&wstr4&"'")(0)=0 Then
Cn.execute("Insert Into G_News (Topic,Source,Content,Renew_Time) values ('"&wstr4&"','"&wstr3&"',' ','"&dateadd("s",-j,now())&"')")
Else
Exit For
End if
Next
End if

If Dateadd("n",5,OldGoods_Time)<Now() Then
Redim Olds(10)
Dim Old

Old=getHTTPPage("http://www.yw.zj.cn/ershou/index.php?type=0&start=1")
Old=mid(Old,instr(Old,"发布时间"))
Old=mid(Old,1,instr(Old,"转到页面"))
For i = 0 To 9
Old=mid(Old,instr(Old,"<font")+20)
Olds(i)=mid(Old,instr(Old,"href=")+5,instr(Old," onClick")-instr(Old,"href=")-5)
Next
For i = 0 To 9
If cn.execute("Select count(Info_ID) from [G_Info] where Info_CreateTime > '"&dateadd("m",-1,now())&"' and Info_UrlSource = '"&"http://www.yw.zj.cn/ershou/"&Olds(i)&"'")(0) = 0 Then
Old=getHTTPPage("http://www.yw.zj.cn/ershou/"&Olds(i))
Old=mid(Old,1,instr(Old,"有效期:"))

Old=mid(Old,instr(Old,"标题:"))
Old=mid(Old,instr(Old,"#FFFFFF")+9)
Topic=trim(mid(Old,1,instr(Old,"</td>")-1))

Old=mid(Old,instr(Old,"所属类型:"))
Old=mid(Old,instr(Old,"#FFFFFF")+9)
Types=trim(mid(Old,instr(Old,"<font color=")+22,2))

Old=mid(Old,instr(Old,"所属类别:"))
Old=mid(Old,instr(Old,"#FFFFFF")+9)
Sorts=trim(mid(Old,1,instr(Old,"</td>")-1))

Old=mid(Old,instr(Old,"详细内容:"))
Old=mid(Old,instr(Old,"#FFFFFF")+9)
Content=trim(mid(Old,1,instr(Old,"</td>")-1))

Old=mid(Old,instr(Old,"联系人:"))
Old=mid(Old,instr(Old,"#FFFFFF")+9)
Lianxi=trim(mid(Old,1,instr(Old,"</td>")-1))

Old=mid(Old,instr(Old,"联系电话:"))
Old=mid(Old,instr(Old,"#FFFFFF")+9)
Dianhua=trim(mid(Old,1,instr(Old,"</td>")-1))

Old=mid(Old,instr(Old,"手机:"))
Old=mid(Old,instr(Old,"#FFFFFF")+9)
Shouji=trim(mid(Old,1,instr(Old,"</td>")-1))

Old=mid(Old,instr(Old,"E-mail:"))
Old=mid(Old,instr(Old,"#FFFFFF")+9)
Email=trim(mid(Old,1,instr(Old,"</td>")-1))

Old=mid(Old,instr(Old,"地址:"))
Old=mid(Old,instr(Old,"#FFFFFF")+9)
Addr=trim(mid(Old,1,instr(Old,"</td>")-1))


Max_Info_Number = Get_SerialNumber("G_Info","Info_ID","Info_Number")
iSql = "Select * From G_Info"
rs.Open iSql,Cn,1,3
rs.AddNew
rs("Info_User_ID") = 0
rs("Info_Number") = Max_Info_Number
rs("Class_Frist") = 2
Get_tclass=0
If Types="转让" Then
rs("Class_Second") = 13
rs("Type_Number") = 1
If instr(Sorts,"手机及通讯")>0 Then Get_tclass=38
If instr(Sorts,"电脑及配件")>0 Then Get_tclass=53
If instr(Sorts,"摩托车")>0 Then Get_tclass=36
If instr(Sorts,"家用电器")>0 Then Get_tclass=46
If instr(Sorts,"音像制品")>0 Then Get_tclass=39
If instr(Sorts,"报刊书籍")>0 Then Get_tclass=47
If instr(Sorts,"二手票")>0 Then Get_tclass=34
If instr(Sorts,"艺术收藏")>0 Then Get_tclass=49
If instr(Sorts,"家具")>0 Then Get_tclass=45
If Get_tclass=0 Then Get_tclass=54
Else
rs("Class_Second") = 14
rs("Type_Number") = 2
If instr(Sorts,"手机及通讯")>0 Then Get_tclass=59
If instr(Sorts,"电脑及配件")>0 Then Get_tclass=74
If instr(Sorts,"摩托车")>0 Then Get_tclass=57
If instr(Sorts,"家用电器")>0 Then Get_tclass=67
If instr(Sorts,"音像制品")>0 Then Get_tclass=60
If instr(Sorts,"报刊书籍")>0 Then Get_tclass=68
If instr(Sorts,"二手票")>0 Then Get_tclass=55
If instr(Sorts,"艺术收藏")>0 Then Get_tclass=70
If instr(Sorts,"家具")>0 Then Get_tclass=66
If Get_tclass=0 Then Get_tclass=76
End If

rs("Class_Three") = Get_tclass

Info_ContactWay=Dianhua&"/"&Shouji&"/"&Email

rs("Info_ContactWay") = Info_ContactWay

rs("Info_ContactMan") = Lianxi

rs("Info_Password") = "yw.zj.cn"

rs("Info_Topic") = Topic

rs("Info_Content") = Topic&Info_ContactWay&Lianxi&Addr&Content

rs("Info_PicturePath") = ""
rs("Info_CreateTime") = dateadd("s",i,Now())
rs("Info_Top") = 0
rs("Info_DisplayTime") = Date()+7&" 23:59:59"
rs("Info_VistersTime") = dateadd("s",i,Now())
rs("Info_Displays") = 0
rs("Info_ZhongJie") = 0
rs("Info_Auditing") = 0
rs("Info_UrlSource") = "http://www.yw.zj.cn/ershou/"&Olds(i)
rs.Update
'//提取最后ID
MainInof_ID = rs("Info_ID")
rs.Close

'//写入子表[G_OldGoods]
bSql = "Select * From G_OldGoods"
rs.Open bSql,Cn,1,3
rs.AddNew
rs("MainInof_ID") = MainInof_ID
rs("Goods_User_ID") = 0
rs("Goods_Title") = Topic
rs("Goods_Content") = Content
rs("Goods_Degree") = "二手"
rs("Goods_Rental") = 0
rs("Goods_Deliver") = "双方联系"
rs("Goods_Address") = Addr
rs("Goods_Piece") = 1
rs.Update
rs.Close
Call post_Add("G_Class","Class_Times",2)
If Types="转让" Then
Call post_Add("G_Class","Class_Times",13)
Else
Call post_Add("G_Class","Class_Times",14)
End If
Call post_Add("G_Class","Class_Times",Get_tclass)
End If
Next


--------------------编程问答-------------------- 求助高手根据此代码写一个定时采集在程序,有偿!!有意者与我联系: QQ:624237228

样例程序如下:
如有那位高手帮忙详细注释一下,不胜感激:
Dim wstr1,i
wstr1=getHTTPPage("http://www.ywnews.cn/ywxw/index.htm")
i=0
If instr(wstr1,"◎ <A class=bt_content")>0 Then
wstr1=mid(wstr1,instr(wstr1,"◎ <A class=bt_content"))
wstr1=mid(wstr1,1,instr(wstr1,"<td align=right colspan=2>")-16)
wstr1=replace(wstr1,vbCrlf,"")
wstr1=replace(wstr1,"""","'")
wstr1=replace(wstr1," class=bt_content","")
wstr2=split(wstr1,"</td></tr><tr><td>")
i=ubound(wstr2)
If i > 5 Then
i=5
End If
End If
For j = 0 to i
wstr3=mid(wstr2(j),instr(wstr2(j),"href='")+len("href='"))
wstr3=mid(wstr3,1,instr(wstr3,"' target='_blank'")-1)
wstr4=mid(wstr2(j),instr(wstr2(j),"target='_blank'>")+len("target='_blank'>"))
wstr4=mid(wstr4,1,instr(wstr4,"</A>")-1)
If Cn.execute("Select count(id) from [G_News] where Topic = '"&wstr4&"'")(0)=0 Then
Cn.execute("Insert Into G_News (Topic,Source,Content,Renew_Time) values ('"&wstr4&"','"&wstr3&"',' ','"&dateadd("s",-j,now())&"')")
Else
Exit For
End if
Next
End if

If Dateadd("n",5,OldGoods_Time)<Now() Then
Redim Olds(10)
Dim Old

Old=getHTTPPage("http://www.yw.zj.cn/ershou/index.php?type=0&start=1")
Old=mid(Old,instr(Old,"发布时间"))
Old=mid(Old,1,instr(Old,"转到页面"))
For i = 0 To 9
Old=mid(Old,instr(Old,"<font")+20)
Olds(i)=mid(Old,instr(Old,"href=")+5,instr(Old," onClick")-instr(Old,"href=")-5)
Next
For i = 0 To 9
If cn.execute("Select count(Info_ID) from [G_Info] where Info_CreateTime > '"&dateadd("m",-1,now())&"' and Info_UrlSource = '"&"http://www.yw.zj.cn/ershou/"&Olds(i)&"'")(0) = 0 Then
Old=getHTTPPage("http://www.yw.zj.cn/ershou/"&Olds(i))
Old=mid(Old,1,instr(Old,"有效期:"))

Old=mid(Old,instr(Old,"标题:"))
Old=mid(Old,instr(Old,"#FFFFFF")+9)
Topic=trim(mid(Old,1,instr(Old,"</td>")-1))

Old=mid(Old,instr(Old,"所属类型:"))
Old=mid(Old,instr(Old,"#FFFFFF")+9)
Types=trim(mid(Old,instr(Old,"<font color=")+22,2))

Old=mid(Old,instr(Old,"所属类别:"))
Old=mid(Old,instr(Old,"#FFFFFF")+9)
Sorts=trim(mid(Old,1,instr(Old,"</td>")-1))

Old=mid(Old,instr(Old,"详细内容:"))
Old=mid(Old,instr(Old,"#FFFFFF")+9)
Content=trim(mid(Old,1,instr(Old,"</td>")-1))

Old=mid(Old,instr(Old,"联系人:"))
Old=mid(Old,instr(Old,"#FFFFFF")+9)
Lianxi=trim(mid(Old,1,instr(Old,"</td>")-1))

Old=mid(Old,instr(Old,"联系电话:"))
Old=mid(Old,instr(Old,"#FFFFFF")+9)
Dianhua=trim(mid(Old,1,instr(Old,"</td>")-1))

Old=mid(Old,instr(Old,"手机:"))
Old=mid(Old,instr(Old,"#FFFFFF")+9)
Shouji=trim(mid(Old,1,instr(Old,"</td>")-1))

Old=mid(Old,instr(Old,"E-mail:"))
Old=mid(Old,instr(Old,"#FFFFFF")+9)
Email=trim(mid(Old,1,instr(Old,"</td>")-1))

Old=mid(Old,instr(Old,"地址:"))
Old=mid(Old,instr(Old,"#FFFFFF")+9)
Addr=trim(mid(Old,1,instr(Old,"</td>")-1))


Max_Info_Number = Get_SerialNumber("G_Info","Info_ID","Info_Number")
iSql = "Select * From G_Info"
rs.Open iSql,Cn,1,3
rs.AddNew
rs("Info_User_ID") = 0
rs("Info_Number") = Max_Info_Number
rs("Class_Frist") = 2
Get_tclass=0
If Types="转让" Then
rs("Class_Second") = 13
rs("Type_Number") = 1
If instr(Sorts,"手机及通讯")>0 Then Get_tclass=38
If instr(Sorts,"电脑及配件")>0 Then Get_tclass=53
If instr(Sorts,"摩托车")>0 Then Get_tclass=36
If instr(Sorts,"家用电器")>0 Then Get_tclass=46
If instr(Sorts,"音像制品")>0 Then Get_tclass=39
If instr(Sorts,"报刊书籍")>0 Then Get_tclass=47
If instr(Sorts,"二手票")>0 Then Get_tclass=34
If instr(Sorts,"艺术收藏")>0 Then Get_tclass=49
If instr(Sorts,"家具")>0 Then Get_tclass=45
If Get_tclass=0 Then Get_tclass=54
Else
rs("Class_Second") = 14
rs("Type_Number") = 2
If instr(Sorts,"手机及通讯")>0 Then Get_tclass=59
If instr(Sorts,"电脑及配件")>0 Then Get_tclass=74
If instr(Sorts,"摩托车")>0 Then Get_tclass=57
If instr(Sorts,"家用电器")>0 Then Get_tclass=67
If instr(Sorts,"音像制品")>0 Then Get_tclass=60
If instr(Sorts,"报刊书籍")>0 Then Get_tclass=68
If instr(Sorts,"二手票")>0 Then Get_tclass=55
If instr(Sorts,"艺术收藏")>0 Then Get_tclass=70
If instr(Sorts,"家具")>0 Then Get_tclass=66
If Get_tclass=0 Then Get_tclass=76
End If

rs("Class_Three") = Get_tclass

Info_ContactWay=Dianhua&"/"&Shouji&"/"&Email

rs("Info_ContactWay") = Info_ContactWay

rs("Info_ContactMan") = Lianxi

rs("Info_Password") = "yw.zj.cn"

rs("Info_Topic") = Topic

rs("Info_Content") = Topic&Info_ContactWay&Lianxi&Addr&Content

rs("Info_PicturePath") = ""
rs("Info_CreateTime") = dateadd("s",i,Now())
rs("Info_Top") = 0
rs("Info_DisplayTime") = Date()+7&" 23:59:59"
rs("Info_VistersTime") = dateadd("s",i,Now())
rs("Info_Displays") = 0
rs("Info_ZhongJie") = 0
rs("Info_Auditing") = 0
rs("Info_UrlSource") = "http://www.yw.zj.cn/ershou/"&Olds(i)
rs.Update
'//提取最后ID
MainInof_ID = rs("Info_ID")
rs.Close

'//写入子表[G_OldGoods]
bSql = "Select * From G_OldGoods"
rs.Open bSql,Cn,1,3
rs.AddNew
rs("MainInof_ID") = MainInof_ID
rs("Goods_User_ID") = 0
rs("Goods_Title") = Topic
rs("Goods_Content") = Content
rs("Goods_Degree") = "二手"
rs("Goods_Rental") = 0
rs("Goods_Deliver") = "双方联系"
rs("Goods_Address") = Addr
rs("Goods_Piece") = 1
rs.Update
rs.Close
Call post_Add("G_Class","Class_Times",2)
If Types="转让" Then
Call post_Add("G_Class","Class_Times",13)
Else
Call post_Add("G_Class","Class_Times",14)
End If
Call post_Add("G_Class","Class_Times",Get_tclass)
End If
Next


--------------------编程问答-------------------- Redim Jobb(10)
Dim Job
Job=getHTTPPage("http://www.125job.com/jobs/index_get_jobs.php")
Job=mid(Job,instr(Job,"jobs[0]"))
Job=mid(Job,1,instr(Job,"jobs_info[0]")-1)
Job=Replace(Job,"'","")
For i = 0 to 9
Job=mid(Job,instr(Job,"Array(")+len("Array("))
Jobb(i)=mid(Job,1,instr(Job,");")-1)
Next
For i = 0 To 9
j=split(Jobb(i),",")
If cn.execute("Select count(Info_ID) from [G_Info] where Info_CreateTime > '"&dateadd("m",-1,now())&"' and Info_UrlSource = '"&"http://www.125job.com/jobs/qlm-job-info-"&j(0)&".htm'")(0) = 0 Then
Zhiwei=j(2)
Zhiwu=Zhiwei
ComsName=j(3)

Job=getHTTPPage("http://www.125job.com/jobs/qlm-job-info-"&j(0)&".htm")
Job=mid(Job,instr(Job,"font-size:14px;color:#FF4E00;"))
Job=mid(Job,1,instr(Job,"有的企业会屏蔽掉电话"))

Gongzuo=mid(Job,instr(Job,"工作类型:</div>")+len("工作类型:</div>"))
Gongzuo=mid(Gongzuo,instr(Gongzuo,">")+len(">"))
Gongzuo=mid(Gongzuo,1,instr(Gongzuo,"</div>")-1)

Rensu=mid(Job,instr(Job,"招聘人数:</div>")+len("招聘人数:</div>"))
Rensu=mid(Rensu,instr(Rensu,">")+len(">"))
Rensu=mid(Rensu,1,instr(Rensu,"</div>")-1)

Xuli=mid(Job,instr(Job,"学历要求:</div>")+len("学历要求:</div>"))
Xuli=mid(Xuli,instr(Xuli,">")+len(">"))
Xuli=mid(Xuli,1,instr(Xuli,"</div>")-1)

XingBei=mid(Job,instr(Job,"性别要求:</div>")+len("性别要求:</div>"))
XingBei=mid(XingBei,instr(XingBei,">")+len(">"))
XingBei=mid(XingBei,1,instr(XingBei,"</div>")-1)

Nianling=mid(Job,instr(Job,"年龄要求:</div>")+len("年龄要求:</div>"))
Nianling=mid(Nianling,instr(Nianling,">")+len(">"))
Nianling=mid(Nianling,1,instr(Nianling,"</div>")-1)

Huji="不限"

JieSao=mid(Job,instr(Job,"职位描述</span>")+len("职位描述</span>"))
JieSao=mid(JieSao,instr(JieSao,"<br>")+len("<br>"))
JieSao=mid(JieSao,1,instr(JieSao,"</div>")-1)

Addr=mid(Job,instr(Job,"通信地址:</span>")+len("通信地址:</span>"))
Addr=trim(mid(Addr,1,instr(Addr,"<br>")-1))

LXRen=mid(Job,instr(Job,"联 系 人:</span>")+len("联 系 人:</span>"))
LXRen=trim(mid(LXRen,1,instr(LXRen,"<br>")-1))

Tel=mid(Job,instr(Job,"联系电话: </span>")+len("联系电话: </span>"))
Tel=trim(mid(Tel,1,instr(Tel,"<br>")-1))

ComsContent=mid(Job,instr(Job,"公司介绍</span><br>")+len("公司介绍</span><br>"))
ComsContent=trim(mid(ComsContent,1,instr(ComsContent,"</div>")-2))

Max_Info_Number = Get_SerialNumber("G_Info","Info_ID","Info_Number")
iSql = "Select * From G_Info"
rs.Open iSql,Cn,1,3
rs.AddNew
rs("Info_User_ID") = 0
rs("Info_Number") = Max_Info_Number
rs("Class_Frist") = 4
rs("Class_Second") = 19

Get_tclass=93
If instr(Zhiwei,"展会")>0 Or instr(Zhiwei,"促销")>0 Or instr(Zhiwu,"展会")>0 Or instr(Zhiwu,"促销")>0 Then Get_tclass=77
If instr(Zhiwei,"文秘")>0 Or instr(Zhiwei,"助理")>0 Or instr(Zhiwu,"文秘")>0 Or instr(Zhiwu,"助理")>0 Then Get_tclass=78
If instr(Zhiwei,"电脑")>0 Or instr(Zhiwei,"网络")>0 Or instr(Zhiwu,"电脑")>0 Or instr(Zhiwu,"网络")>0 Then Get_tclass=79
If instr(Zhiwei,"销售")>0 Or instr(Zhiwei,"市场")>0 Or instr(Zhiwu,"销售")>0 Or instr(Zhiwu,"市场")>0 Then Get_tclass=80
If instr(Zhiwei,"家教")>0 Or instr(Zhiwei,"翻译")>0 Or instr(Zhiwu,"家教")>0 Or instr(Zhiwu,"翻译")>0 Then Get_tclass=81
If instr(Zhiwei,"店员")>0 Or instr(Zhiwei,"侍者")>0 Or instr(Zhiwu,"店员")>0 Or instr(Zhiwu,"侍者")>0 Then Get_tclass=82
If instr(Zhiwei,"编辑")>0 Or instr(Zhiwei,"记者")>0 Or instr(Zhiwu,"编辑")>0 Or instr(Zhiwu,"记者")>0 Then Get_tclass=83
If instr(Zhiwei,"派发")>0 Or instr(Zhiwei,"问卷")>0 Or instr(Zhiwu,"派发")>0 Or instr(Zhiwu,"问卷")>0 Then Get_tclass=84
If instr(Zhiwei,"广告")>0 Or instr(Zhiwei,"设计")>0 Or instr(Zhiwu,"广告")>0 Or instr(Zhiwu,"设计")>0 Then Get_tclass=85
If instr(Zhiwei,"会计")>0 Or instr(Zhiwei,"出纳")>0 Or instr(Zhiwu,"会计")>0 Or instr(Zhiwu,"出纳")>0 Then Get_tclass=86
If instr(Zhiwei,"技工")>0 Or instr(Zhiwei,"学徒")>0 Or instr(Zhiwu,"技工")>0 Or instr(Zhiwu,"学徒")>0 Then Get_tclass=87
If instr(Zhiwei,"客服")>0 Or instr(Zhiwei,"热线")>0 Or instr(Zhiwu,"客服")>0 Or instr(Zhiwu,"热线")>0 Then Get_tclass=88
If instr(Zhiwei,"歌手")>0 Or instr(Zhiwei,"模特")>0 Or instr(Zhiwu,"歌手")>0 Or instr(Zhiwu,"模特")>0 Then Get_tclass=89
If instr(Zhiwei,"导游")>0 Or instr(Zhiwei,"司仪")>0 Or instr(Zhiwu,"导游")>0 Or instr(Zhiwu,"司仪")>0 Then Get_tclass=90
If instr(Zhiwei,"法律")>0 Or instr(Zhiwei,"相关")>0 Or instr(Zhiwu,"法律")>0 Or instr(Zhiwu,"相关")>0 Then Get_tclass=91
If instr(Zhiwei,"酒吧")>0 Or instr(Zhiwei,"公关")>0 Or instr(Zhiwu,"酒吧")>0 Or instr(Zhiwu,"公关")>0 Then Get_tclass=92

rs("Class_Three") = Get_tclass

rs("Type_Number") = 8

Info_ContactWay=Tel

rs("Info_ContactWay") = Info_ContactWay

rs("Info_ContactMan") = LXRen

rs("Info_Password") = "125job.com"

rs("Info_Topic") = ComsName

rs("Info_Content") = ComsName&Info_ContactWay&LXRen&Addr&Zhiwu&Zhiwei

rs("Info_PicturePath") = ""
rs("Info_CreateTime") = dateadd("s",i,Now())
rs("Info_Top") = 0
rs("Info_DisplayTime") = Date()+7&" 23:59:59"
rs("Info_VistersTime") = dateadd("s",i,Now())
rs("Info_Displays") = 0
rs("Info_ZhongJie") = 0
rs("Info_Auditing") = 0
rs("Info_UrlSource") = "http://www.125job.com/jobs/qlm-job-info-"&j(0)&".htm"
rs.Update
'//提取最后ID
MainInof_ID = rs("Info_ID")
rs.Close

bSql = "Select * From G_Job"
rs.Open bSql,Cn,1,3
rs.AddNew
rs("MainInof_ID") = MainInof_ID
rs("Job_User_ID") = 0
rs("Job_Title") = ComsName
rs("Job_Companys") = ComsContent
rs("Job_Content") = "具体职务:"&Zhiwei&"<BR><BR>"&JieSao
rs("Job_Address") = Addr
If instr(Rensu,"人")>0 Then
rs("Job_Number") = trim(Replace(Rensu,"人",""))
Else
rs("Job_Number") = 0
End If
rs("Job_Wages") = 0
rs("Job_workMode") = Gongzuo
rs("Job_Contact") = "电话联系后通知面试"
rs("Job_Population") = Huji
rs("Job_Sex") = "不限"
rs("Job_Diploma") = Xuli
rs("Job_Age") = Nianling
rs("Job_Experience") = 0
rs.Update
rs.Close

Call post_Add("G_Class","Class_Times",4)
Call post_Add("G_Class","Class_Times",19)
Call post_Add("G_Class","Class_Times",Get_tclass)
End If
Next

Redim houses(10)
Redim housess(10)
Dim house

house=getHTTPPage("http://www.yw.zj.cn/house/index.php?type=4")
house=mid(house,instr(house,"发布时间"))
house=mid(house,1,instr(house,"转到页面"))
If instr(house,"置顶")>0 Then
house=mid(house,instr(house,"置顶"))
End If
--------------------编程问答-------------------- Redim houses(10)
Redim housess(10)
Dim house

house=getHTTPPage("http://www.yw.zj.cn/house/index.php?type=4")
house=mid(house,instr(house,"发布时间"))
house=mid(house,1,instr(house,"转到页面"))
If instr(house,"置顶")>0 Then
house=mid(house,instr(house,"置顶"))
End If
house=Replace(house,chr(34),"'")
For i = 0 To 9
house=mid(house,instr(house,"'73'")+len("'73'"))
houses(i)=trim(mid(house,instr(house,"<a href=message.php?id=")+len("<a href=message.php?id="),instr(house," onClick=")-instr(house,"<a href=message.php?id=")-len("<a href=message.php?id=")))
housess(i)=trim(mid(house,instr(house,"'return pop(this.href);'>")+len("'return pop(this.href);'>"),2))
Next
For i = 0 To 9
If housess(i)="出租" Or housess(i)="求租" Then
If cn.execute("Select count(Info_ID) from [G_Info] where Info_CreateTime > '"&dateadd("m",-1,now())&"' and Info_UrlSource = '"&"http://www.yw.zj.cn/house/message.php?id="&houses(i)&"'")(0) = 0 Then
house=getHTTPPage("http://www.yw.zj.cn/house/message.php?id="&houses(i))

house=mid(house,instr(house,"房屋具易做图置</td>")+len("房屋具易做图置</td>"))
Addr=Trim(mid(house,instr(house,">")+len(">"),instr(house,"</td>")-instr(house,">")-len(">")))

house=mid(house,instr(house,"房屋类型<br></td>")+len("房屋类型<br></td>"))
Types=Trim(mid(house,instr(house,">")+len(">"),instr(house,"</td>")-instr(house,">")-len(">")))

house=mid(house,instr(house,"租金(售价)</td>")+len("租金(售价)</td>"))
Jia=Trim(Replace(mid(house,instr(house,">")+len(">"),instr(house,"</td>")-instr(house,">")-len(">")),vbCrlf,""))

house=mid(house,instr(house,"其他说明</td>")+len("其他说明</td>"))
SM=Trim(mid(house,instr(house,">")+len(">"),instr(house,"</td>")-instr(house,">")-len(">")))

house=mid(house,instr(house,"联系人</td>")+len("联系人</td>"))
Ren=Trim(mid(house,instr(house,">")+len(">"),instr(house,"</td>")-instr(house,">")-len(">")))

house=mid(house,instr(house,"电话</td>")+len("电话</td>"))
Tel=Trim(mid(house,instr(house,">")+len(">"),instr(house,"</td>")-instr(house,">")-len(">")))

Max_Info_Number = Get_SerialNumber("G_Info","Info_ID","Info_Number")
iSql = "Select * From G_Info"
rs.Open iSql,Cn,1,3
rs.AddNew
rs("Info_User_ID") = 0
rs("Info_Number") = Max_Info_Number
rs("Class_Frist") = 3
If housess(i)="出租" Then
rs("Class_Second") = 15
rs("Type_Number") = 3
Else
rs("Class_Second") = 16
rs("Type_Number") = 4
End If
rs("Class_Three") = 0

Info_ContactWay=Tel

rs("Info_ContactWay") = Info_ContactWay

rs("Info_ContactMan") = Ren

rs("Info_Password") = "www.yw.zj.cn"

rs("Info_Topic") = "["&left(Types,10)&"]"&left(Addr,15)

rs("Info_Content") = Addr&Types&Ren&Addr&SM

rs("Info_PicturePath") = ""
rs("Info_CreateTime") = dateadd("s",i,Now())
rs("Info_Top") = 0
rs("Info_DisplayTime") = Date()+7&" 23:59:59"
rs("Info_VistersTime") = dateadd("s",i,Now())
rs("Info_Displays") = 0
rs("Info_ZhongJie") = 0
rs("Info_Auditing") = 0
rs("Info_UrlSource") = "http://www.yw.zj.cn/house/message.php?id="&houses(i)
rs.Update
'//提取最后ID
MainInof_ID = rs("Info_ID")
rs.Close

bSql = "Select * From G_House"
rs.Open bSql,Cn,1,3
rs.AddNew
rs("MainInof_ID") = MainInof_ID
rs("House_User_ID") = 0
rs("House_Content") = "户型:"&Types&"<BR><BR>租金:"&Jia&"<BR><BR>其他说明:"&SM
rs("House_Address") = Addr
rs("House_DoorType") = 0
rs("House_DoorTypes") = Types
rs("House_Floor") = 0
rs("House_TotalFloor") = 0
rs("House_Rooms") = 0
rs("House_Hall") = 0
rs("House_Health") = 0
rs("House_Veranda") = 0
rs("House_Kitchen") = 0
rs("House_Rental") = 0
rs("House_RentalType") = "元/年"
rs("House_Area") = 0
rs("House_Repair") = "未填写"
rs("House_Equipments") = "未填写"
rs.Update
rs.Close
Call post_Add("G_Class","Class_Times",3)
If housess(i)="出租" Then
Call post_Add("G_Class","Class_Times",15)
Else
Call post_Add("G_Class","Class_Times",16)
End If
End If
End If
Next

SystemSql="Select * From [G_System] Where ID = 1"
Rs.Open SystemSql,Cn,1,3
rs("OldGoods_Time")=now()
Rs.update
Rs.Close
End If

End If --------------------编程问答-------------------- 这个仅仅是小偷程序而已。

可不可以作采集入库,但是不用“根据此代码写一个定时采集在程序”,我用我自己的方法采集?? --------------------编程问答-------------------- 要求可以入库,可以定时采集就行!因为我写不好采集规则,所以相请人代写!!只要能达到功能即可。
补充:.NET技术 ,  ASP.NET
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,