|
- Sub text()
- Dim str$, html, url$, r%, arr, i%, p%, j%
- Dim db, dr
- Application.ScreenUpdating = Fals
- Set html = CreateObject("htmlfile")
- k = 1
- For j = 1 To 1
- url = "http://ggzy.hefei.gov.cn/jyxx/002001/002001001/moreinfo_jyxxgg2.html"
- With CreateObject("WinHttp.WinHttpRequest.5.1")
- .Open "GET", url, False
- .setRequestHeader "cookie", "fontZoomState=0"
- .setRequestHeader "Referer", "http://ggzy.hefei.gov.cn/jyxx/002001/002001001/" & j & ".html"
- .send
- str = .responseText
- End With
- Debug.Print str
- For r = 0 To 19
- k = k + 1
- arr = Split(str, "</li>")(r)
- Cells(k, 1) = Split(Split(Split(arr, "</span>")(0), ">")(3), "")
- Cells(k, 2) = Split(Split(Split(arr, "</span>")(1), ">")(1), "")
- Cells(k, 3) = Split(Split(Split(arr, "</span>")(2), ">")(4), "")
- Cells(k, 4) = Split(Split(Split(arr, "</span>")(3), ">")(2), "")
- Next r
- Next j
- Application.ScreenUpdating = True
- MsgBox " TaxNews:Complete!" & vbCrLf & vbCrLf & "用时:" & " " & Timer - t & "秒", vbInformation, "Warm Tips"
- End Sub
|
|