Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

scraping web con xmlhttp

publicado

Saludos espero me puedan ayudar, he intentado todo y no lo consigo.

estoy tratando de descargar datos de una web la cual es "post" y posteriormente es "get" redirecciona a otra pagina, solo lo he logrado con el navegadro explorer pero el detalle que es muy tardado ya que son 170mil datos y con explorer es como si fuera navegando, abrir explorador, poner url, bucar las etiquetas donde se hace la cosulta y despues click en un boton, esperar a que cargue la pagina y extraer los datos de esa consulta.

 

me gustaria poderlo hacer mediante xmlhttp

 

anexo link de la pagina  https://serviciosfinanzas.villahermosa.gob.mx:8800/serviciosfinanzas/dp/busqueda-agua.html

y mi codigo 

 

Sub Web_Data()

    Dim str_arg As String
   Dim URL
    str_arg = "xContrato=000001&Buscar=Buscar"
    URL = "https://serviciosfinanzas.villahermosa.gob.mx:8800/serviciosfinanzas/dp/busqueda-agua.html"

Set OBJHTTP = CreateObject("MSXML2.XMLHTTP")
 

  With OBJHTTP
    
        .Open "GET", URL, False
        .setRequestHeader "User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
        .setRequestHeader "contenido-type", "text/html"
        .setRequestHeader "contenido-type", "application/xhtml+xml"
        .setRequestHeader "contenido-type", "application/x-www-form-urlencoded"
        
        .setRequestHeader "contenido-type", "application/javascript"
        .send str_arg
        TXT = .responseText
        Debug.Print TXT
        
    End With
    [A1] = html.getElementsByTagName("td")(1).innerText

'valor a extraer numero de contrato, nombre y direccion


End Sub

Featured Replies

No hay posts para mostrar

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.