*!* 提取学校和代码:
Clear
Create Cursor Url_tab ( No I, URL C(100), university C(30) )
*!* oHTTP = Createobject("Winhttp.winhttprequest.5.1")
oHTTP = Createobject("MSXML2.ServerXmlHttp")
oHTTP.SetTimeouts(10000, 10000, 10000, 40000) && 设置超时
=GetURL(1, 120) && 枚举页数范围,范围尽量不要太大,会引起超时,分批提取
oHTTP = .Null.
Go Top
Browse Last
Function GetURL(StartNo As Integer, EndNo As Integer)
For I = StartNo To EndNo
oHTTP.Open("GET", 'http://www.' + Transform(I), .F.)
oHTTP.Send()
Try
If oHTTP.Status = 200
Wait Window Transform(I) Nowait At 10, 10
lcName = Strextract(oHTTP.ResponseText,[<div class="centbot1" title="], [">], 1)
Insert Into Url_tab Values ( I, 'http://www.' + Transform(I), lcName )
Endif
Catch
* error handling code here.
* ? "Error"
Return
Endtry
Endfor
? "Finish"
Endfunc
Clear
Create Cursor Url_tab ( No I, URL C(100), university C(30) )
*!* oHTTP = Createobject("Winhttp.winhttprequest.5.1")
oHTTP = Createobject("MSXML2.ServerXmlHttp")
oHTTP.SetTimeouts(10000, 10000, 10000, 40000) && 设置超时
=GetURL(1, 120) && 枚举页数范围,范围尽量不要太大,会引起超时,分批提取
oHTTP = .Null.
Go Top
Browse Last
Function GetURL(StartNo As Integer, EndNo As Integer)
For I = StartNo To EndNo
oHTTP.Open("GET", 'http://www.' + Transform(I), .F.)
oHTTP.Send()
Try
If oHTTP.Status = 200
Wait Window Transform(I) Nowait At 10, 10
lcName = Strextract(oHTTP.ResponseText,[<div class="centbot1" title="], [">], 1)
Insert Into Url_tab Values ( I, 'http://www.' + Transform(I), lcName )
Endif
Catch
* error handling code here.
* ? "Error"
Return
Endtry
Endfor
? "Finish"
Endfunc
团队红星二锅头,队长王猛,领队李冲,顾问杨伟,副队张挺,外联马彪,内勤韩秀,人事顾闯,财务赵魁,后勤周强