I have a simple Excel VBA web scraping sub that I have used for a couple of websites just fine.
The main summary is that it goes to the website, then performs:
While .Busy Or .readyState <> 4: DoEvents: Wend ie.ExecWB 17, 0 '// Select All ie.ExecWB 12, 2 '// Copy selection
I then paste that into my excel, and extract my data.
The problem is, that on this website: https://www.legalandgeneral.com/investments/funds/prices-and-reports/daily-fund-prices/ The table with all the data isn't selected when I hit ctrl + A, or with ie.ExecWB 17,0 in the code. If I click on the table and then do ctrl + A it does select the data. I tried using a CSS selector to click the table, then run ie.ExecWB 17,0 but it doesn't work.
Any ideas?
Many thanks
Dave
Both Zwenn and QHarr spotted this, with the table iFrame pointing to 5 different sources.
Hitting 'inspect' on the table, you would see something like this:
<iframe style="border: 0;" src="https://widgets-lgim.huguenots.co.uk/Consumer-> unit-trust-prices-actively-managed-funds" width="1000" height="1900" scrolling="no"></iframe>
So then I found all the other sources by changing the table tab, and inspecting:
https://widgets-lgim.huguenots.co.uk/Consumer-unit-trust-prices-n-unit-trust
https://widgets-lgim.huguenots.co.uk/Consumer-unit-trust-prices-index-tracking-funds
https://widgets-lgim.huguenots.co.uk/Consumer-unit-trust-prices-multi-asset-funds
https://widgets-lgim.huguenots.co.uk/Consumer-unit-trust-prices-fixed-income-funds
https://widgets-lgim.huguenots.co.uk/Consumer-unit-trust-prices-actively-managed-funds
This can now be closed.
Regards
2.1m questions
2.1m answers
60 comments
57.0k users