Skip to content
Advertisement

How to parse html div text to json

I try to parse data from html to json structure, but I get empty strings. I do it first time.

Here example of repeatable div block:

JavaScript
JavaScript

But I get this:

JavaScript

How I can get json text from classes .itemVuzTitle and .tooltipq to json structure with fields name like title and scores? Please, help with this question. It helps save a lot of hours of my life.

Advertisement

Answer

class .col-md-12 is too common and may not contain .itemVuzTitle, you need to select class .itemVuzPremium as parent container

JavaScript

output

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