MSXML.XMLHTTPRequest获取响应大小限制

时间:2018-02-08 16:54:19

标签: vba xmlhttprequest size limit getresponse

我正在尝试解析HTML以在网页中查找信息。

到目前为止,一切正常。似乎请求有一个大小限制,因为我没有得到所有的HTML代码:

Sub AAA(A As String, B As String, C As String)

   'Déclaration des variables
   Dim txt As String, url As String
   Dim ohttp As Object

   On Error Resume Next
   'instanciation de l'object MSXML2.XMLHTTP
   Set ohttp = CreateObject("MSXML2.XMLHTTP")
   If Err <> 0 Then Set ohttp = CreateObject("MSXML.XMLHTTPRequest")

   'Gestion de l'erreur si l'instanciation n'a pas fonctionné
   If ohttp Is Nothing Then MsgBox "MSXML2.XMLHTTP not found", 16, "Error":       Exit Sub

   url = "http://www.aaa.com/" & A
   'execution de la demande
   With ohttp
      .Open "GET", url, False
      .send
      txt = .responseText
   End With
   Set ohttp = Nothing
End Sub

您知道如何获取网页的所有HTML代码吗?

提前谢谢你,

致以最诚挚的问候,

安托

0 个答案:

没有答案