Skip to content Skip to sidebar Skip to footer

Scraping Data With No Html Element Id - Excel Vba

To give you a quick background on what I'm trying to do - I'm trying to scrape odds from multiple bookies and exchanges through excel VBA through a macro that would trigger every s

Solution 1:

I'd recommend querySelector Some links: |W2C queryselector| Microsoft queryselector|

This uses CSS selector syntax which is very common now in Javascript because it is how JQuery navigates the DOM.

Chrome is really helpful in that its developer tools give the CSS expression for each element as you move mouse around. I think your screenshot is from Chrome.

If you look really really closely at your screenprint image you will see the CSS selector to get to the cell so "td.bet-buttons.lay-cell.ng-scope.first-lay-cell" This given on the footer bar and also on a tooltip style label

Ah heck, I've gone and circled in red the expressions. Here you go

enter image description here

UPDATE: actually there is an inaccuracy here the full path is given by the complete footer text (i.e. the whole line), the flying tooltip gives the identifier that nhavigates an element given its parent (i.e. just one part of the path).

Post a Comment for "Scraping Data With No Html Element Id - Excel Vba"