7,759
社区成员
发帖
与我相关
我的任务
分享
Dim webBRS As Object
Dim strHTML As String
Set webBRS = CreateObject("Microsoft.XMLHTTP")
webBRS.Open "GET", "http://www.7176.com/title/tt1028532", False
webBRS.send
While webBRS.ReadyState <> 4
DoEvents
Wend
strHTML = StrConv(webBRS.responsebody, vbUnicode)
Function bBytesToBstr(body)
dim objstream
set objstream = CreateObject("adodb.stream") '//调用adodb.stream组件
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = "GB2312" '转换原来默认的UTF-8编码转换成GB2312编码,否则直接用XMLHTTP调用有中文字符的网页得到的将是乱码
bBytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
end Function