本帖最后由 jyswjjgdwtdtj 于 2023-5-24 20:19 编辑
- Set http = CreateObject("msxml2.xmlhttp")
- Set fso = CreateObject("scripting.filesystemobject")
- Function Gethtml(url)
- http.open "GET",url,False
- http.send()
- Gethtml = http.responsetext
- End Function
- burl = InputBox("url")
- Set f = fso.createtextfile("1.txt",True,True)
- For i = 0 To 1000
- Set Document = CreateObject("htmlfile")
- Document.designmode="on"
- html = gethtml(burl & "?start=" & CStr(20 * i) & "&limit=20&status=P&sort=score")
- Document.write html
- Dim score
- For Each div In Document.Getelementsbytagname("div")
- If div.Classname = "comment-list score " Then
- Set score = div
- Exit For
- End If
- Next
- Set ul = score.children(0)
- For Each li In ul.children
- f.writeline li.InnerText
- f.writeline ""
- Next
- Next
复制代码 典型的粗制滥造脚本
输入最后面带有/的啊
比如https://book.douban.com/subject/1023045/comments/
放进vbs文件
楼上那个只能搞一页 |