|
简单粗暴的写了一个》》》》》》》》》》》》》》》》》》》》》》》- Sub shishi()
- Dim strText$, thm As Object, reg As Object, mt, mh, S$, K$
- Set thm = CreateObject("msxml2.xmlhttp")
- For i = 1 To 14
- thm.Open "GET", "https://wapwenku.baidu.com/view/73af3a3a3968011ca30091a2?pn=" & i & "&pu=%20%20pn=1", False
- thm.send
- strText = strText & thm.responseText
- Next
- With CreateObject("VBScript.Regexp")
- .Global = True
- .Pattern = "<div class=""content bgcolor1"">([\s\S]+?)</div>"
- For Each mt In .Execute(strText)
- S = S & mt.submatches(0)
- Next
- .Pattern = "<p class=""txt"">([\s\S]+?)</p>"
- For Each mh In .Execute(S)
- K = K & mh.submatches(0) & vbCr
- Next
- End With
- ActiveDocument.Content.Text = K
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|