Loop through symbols at finance.yahoo.com/lookup

S_White

New Member
Joined
May 8, 2017
Messages
25
Hi,

I'm trying to do a loop though all found symbols at finance.yahoo.com/lookup when using an ISIN code as key. I'm doing it as a web scrape and my code looks like this:

Code:
Sub ScrapeYahoo()
Dim IE As MSXML2.XMLHTTP60
Dim HTMLdoc As MSHTML.HTMLDocument
Dim Databag As Object
Set IE = New MSXML2.XMLHTTP60
With IE
    .Open "GET", "[url=https://finance.yahoo.com/lookup/all?s=DE000BAY0017&t=A&m=ALL]Symbol Lookup from Yahoo! Finance[/url]", False
    .send
    While .READYSTATE <> 4
        DoEvents
    Wend
    Set HTMLdoc = New MSHTML.HTMLDocument
    HTMLdoc.body.innerHTML = .responseText
    .abort
End With
Set Databag = HTMLdoc.getElementById("Col1-0-Lookup-Proxy")
End Sub

By looking into the elements of the page I'm not really able to find a valid ID to look for. The nearest I've found is "Col1-0-Lookup-Proxy" but when debugging into the Children of the object still, I'm not able to find the retrieved symbols. I've also tried to look into whether there is some sort of table in there but without any luck, unfortunately :(

My questions are: Is it possible to loop through all found symbols (in this case 16) in order to find the hyperlinks in each one?
Are there cases where it is impossible to do a web scrape because of the way the web page is build?
Anyone who can assist me here?

Thanks
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top