Extract / scraping DIV data from website and copy to Excel

k0023382

New Member
Joined
Feb 25, 2010
Messages
45
Hi,
Here is the challenge.

In the past, elements were more or less fixed and was able to use my very well known method QueryTables under Workbooks.open

This website below has a "div", called "div.sidemeta" wihick contains the information I want to grab.
http://www.lynda.com/Web-Interactiv...ls page:1 s:relevance sa:true producttypeid:2


I have tried a different alternative:

Sub Test()
Dim IE As Object
Set IE = CreateObject("internetexplorer.application")
IE.Navigate "http://www.webiste.com"
IE.Visible = True

'Wait for the page to finish loading
Do While IE.Busy Or IE.ReadyState <> 4
DoEvents
Loop

'Get data
Set IEdoc = IE.document
Debug.Print IEdoc.body.innerhtml

IEdoc.Close
IE.Quit
End test



The data I get under "IEdoc.body.innerhtml" does not show that particular DIV.
I have tried using getElementById,getNamedItem and getElementByName without any luck.

Anybody knows how to this?
Thanks in advance.
 
I think this should probably be a new thread.

Code to scrape data needs to be rewritten for each page you want to scrape. So you would need a different solution, having had a quick look at the link, I would probably suggest something like dumping the returned data straight into excel and then using text to columns with a "," delimiter
 
Upvote 0

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Forum statistics

Threads
1,215,099
Messages
6,123,084
Members
449,094
Latest member
mystic19

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