I am trying to build a web scraper to extract the links/table entries from the following page:
https://www.adr.db.com/drwebrebrand/dr-universe/corporate_actions_type_e.html
I then want to import these all into an excel sheet. I want to repeat this each day and import the new entries, so I'm thinking a VBA macro that I just have to click once per day might be best to keep it all in the sheet. Another option I've explored is using Apify, but I'm less familiar with how to use it.
However, my web scraping knowledge is limited and all I've been able to do so far is extract the html source code. The relevant part of that looks like this:
<td><a href="dr_details.html?identifier={{bookmarkedDepositaryReceipt.drId}}" class="btn btn-add-to-portfolio " aria-hidden="true"> View full details </a></td>
Which means the URLs are dynamically generated with Javascript, so I'm not actually able to see the generated links for each entry. How would I go about extracting the actual links?
If it helps, this is my VBA code for extracting the HTML:
Sub Oval1_Click()
Dim result As String
Dim myURL As String
Dim winHttpReq As Object
Set winHttpReq = CreateObject("WinHttp.WinHttpRequest.5.1")
myURL = "https://www.adr.db.com/drwebrebrand/dr-universe/corporate_actions_type_e.html"
winHttpReq.Open "GET", myURL, False
winHttpReq.send
result = winHttpReq.responseText
Range("A1").Value = result
Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Dim oFile As Object
Set oFile = fso.CreateTextFile("DB_source.txt")
oFile.WriteLine result
oFile.Close
Set fso = Nothing
Set oFile = Nothing
End Sub