1

I've been trying many codes to click the right button and open the page to scrape the data.

I was able to have the form filled and then click on submit, but the second part I can't seem to put to work. I want it to click on the href with has the same name that I searched on the form

enter image description here

Dim HTMLDoc As HTMLDocument
Dim oBrowser As InternetExplorer

Sub CETIP()

Dim oHTML_Element As IHTMLElement
Dim sURL As String
On Error GoTo Err_Clear
   sURL = "https://www2.cetip.com.br/TitulosCRI"
Set oBrowser = New InternetExplorer
   oBrowser.Silent = True
   oBrowser.timeout = 60
   oBrowser.Navigate sURL
   oBrowser.Visible = True

Do
Loop Until oBrowser.ReadyState = READYSTATE_COMPLETE

Set HTMLDoc = oBrowser.document
  HTMLDoc.all.ddlCodigoIF.Value = "08L0002118"


For Each oHTML_Element In HTMLDoc.getElementsByTagName("input")
    If oHTML_Element.Type = "submit" Then oHTML_Element.Click: Exit For

Next
Err_Clear:

Resume Next
 
End Sub
Dharman
  • 26,923
  • 21
  • 73
  • 125

1 Answers1

0

Fala Renner. Tudo bom?

Me add no Linkedin se precisar de algum help ai com CRI.

Amigo, seguinte. o jeito que consegui raspar essa pagina foi assim:

Power BI - Get data from post request

O problema me parece ser o mesmo (raspar a página).

qqer coisa mandar msg.

abcs