Skip to content
Advertisement

Web scraping data displayed inside button with no name

I’m trying to extract values stored inside different buttons on the webpage. It seems button of each variant has no name, they are just called “variant__box”, which are under “variants” div class.
As far as I can tell, values are loaded by javascript on each variant__box.

This is the website to get the data: https://www.honda.co.uk/motorcycles/range/adventure/crf1100l-africa-twin-adventure-sports/specifications-and-price.html#/

This is the code I’ve written so far

JavaScript

It returns nothing.

Advertisement

Answer

If you want to use the IE you can use the following code. But SIM’s suggestion is better because IE is then omitted.

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement