How does cjiajia use nodejs? And Qt parsing html scheme

  node.js, question

At present, there is a project developed with C++and Qt. Now, there is a problem in parsing html. For example, I want to get the html content of div with id = “test” like jquery. In C++,this is too nurse agrievance. I checked, only one of Google’s open source tools, gumbo, parses html, but its function seems to be not so powerful that it can’t be done for a long time.

I checked a circle later and found that js is the one who knows html best. They seem to be brothers.

Jquery is used in js to complete the above functions with only one line of code.


Ah, what a perfect and concise sentence.

But it is too hard to imagine in the world of C++.

So now I really want to use js to solve my problems. There can be many rich open source projects to support it.
But how can my projects C++and Qt use these js or nodejs to solve the problem?

What can be done? After a round of investigation, it seems that nw.js and Electron are used. I heard that there are quite a few pits. after all, it didn’t take long for them to come out. Abandoning the current system and jumping to these two, if you can’t jump back again, it is estimated that the time has passed for months. The loss outweights the gain and the risk is too great.

Try PhantomJS, memory browser, don’t open the interface, the performance should be ok.