|
楼主 |
发表于 2020-10-10 11:03
|
显示全部楼层
Sub 下级链接抓取中标单位等信息()
Dim str$, html, url$, r%, arr, j%
Application.ScreenUpdating = Fals
Set html = CreateObject("htmlfile")
For K = 1 To 10
On Error Resume Next
url = Cells(K, 4)
With CreateObject("WinHttp.WinHttpRequest.5.1")
.Open "GET", url, False
.setRequestHeader "cookie", "fontZoomState=0"
.setRequestHeader "Referer", url
.send
str = .responseText
End With
Debug.Print str
Dim regExp As Object
Set regExp = CreateObject("VBScript.RegExp")
regExp.Global = True
regExp.Pattern = "合同价估算:|项目概算:|本标段投资|约|\d+\.?\d+|万元"
Set Cells(K, 6) = regExp.Execute(str) |
|