Web' den veri alma hk.

Katılım
29 Ocak 2024
Mesajlar
76
Excel Vers. ve Dili
Office 2016
Merhabalar,
Aşağıda yer alan kod ile;

https://www.investing.com/

sitesinde arama yapmak istiyorum, e üstte yer alan search alanına metini nasıl göndereceğimi bir türlü çözemedim.

Kod:
<input type="search" placeholder="Search the website..." aria-label="Search Stocks, Currencies" data-test="search-section">
bunu öğeyi nasıl ifade edebiliriz?
yardımcı olursanız sevinirim,
şimdiden teşekkürler,

Kod:
Sub Test()
    Dim URL As String
    Dim IE As InternetExplorer
    Dim htmlDOC As HTMLDocument
    Dim div As Variant

    URL = "https://www.investing.com/"
  
    Set IE = New InternetExplorer
  
    IE.navigate URL
  
    Do Until IE.readyState = 4
    Loop
  
    Set htmlDOC = IE.document
  
    Set div = htmlDOC.getElementsByClassName("inv-button mainSearch_mobile-back__81yxi")(0).all

    For Each oHTML_Element In div
        MsgBox oHTML_Element.getElementsByTagName()
    Next

    IE.Quit
    Set div= Nothing
    Set IE = Nothing

End Sub
 
Üst