• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

Web' den veri alma hk.

Katılım
29 Ocak 2024
Mesajlar
277
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
 
Geri
Üst