79776585

Date: 2025-09-27 07:31:15
Score: 0.5
Natty:
Report link

I have found a non working piece of code in the internet (see below).

Start citation:

-----------------

Sub WebScraping()
    Dim URL As String
    Dim IE As Object
    Dim html As Object
    
    Dim element As Object
    Dim i As Integer
   
    URL = "https://www.yahoo.com/"
   
    'You can fill just one argument with either part of webpage title or URL as keyword to search for the target browser and leave another one blank (“”).
    'If you provide both title and URL, the function returns the DOM of the only browser/tab that meets both criteria.
    Set html = findEdgeDOM("", URL)

    If html Is Nothing Then
        Debug.Print "Not found " & URL
        Exit Sub
    End If
   
    Debug.Print html.Title, html.URL
   
    Cells.Clear
    i = 1
    For Each element In html.getElementsByClassName("ntk-footer-link")
        Cells(i, 1).Value = element.innerText
        i = i + 1
    Next element

End Sub
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Filler text (0.5): -----------------
  • Low reputation (1):
Posted by: ber999