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:
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
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