|
吴姐回复的帖子
主题;回帖;看帖- Sub wcymiss()
- Dim htm As New WinHttpRequest, str As String
- Dim reg As New RegExp
- Dim ar, arr, i, j, m, n
- With htm
- .Open "GET", "http://club.excelhome.net/home.php?mod=space&uid=218917&do=thread&view=me&type=reply&from=space&mobile=yes", False
- .SetRequestHeader "User-Agent", "Mozilla/4.0 (compatible: MSIE 7.0; Windows Phone OS 7.0; Trident/3.1; IEMobile/7.0; SAMSUNG; SGH-i917)"
- .Send
- str = .ResponseText
- Debug.Print str
- With reg
- .Global = True
- .MultiLine = True
- .Pattern = "\s"
- str = .Replace(str, "")
- .Pattern = "xs1"">(.*?)<.*?回(.*?) 看(.*?)<"
- Set ar = .Execute(str)
- End With
- End With
- ReDim arr(0 To ar.Count - 1, 2)
- For i = 0 To ar.Count - 1
- For j = 0 To 2
- arr(i, j) = ar.Item(i).SubMatches(j)
- Next
- Next
- Sheet2.Cells(3, 1).Resize(65533, 4).ClearContents
- n = Sheet2.Range("a65533").End(xlUp).Row
- Sheet2.Cells(n + 1, 1).Resize(ar.Count - 1, 3) = arr
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|