1

I want to get data from a website which it's contents are loading dynamically with JQuery and update every 5 minutes.The website don't have any API, So i have to get it's HTML content and parse it to get what i need. The problem is that the source HTML of the website doese not have the content which is loaded dynamically. I want to do this in c++/Qt. is this possible?


I want to get content which is generated by jquery and it is not available in page source.

11
  • Possible duplicate of How to parse HTML with C++/Qt? Commented Feb 20, 2018 at 19:41
  • @user9335240 It's not a duplicate of that. i want to get the source HTML of content which is generated with jquery. Commented Feb 20, 2018 at 19:46
  • Just try to use QDomDocument on the result of QNetworkRequest, QNetworkReply, QNetworkAccessManager Commented Feb 20, 2018 at 19:53
  • @user9335240 No, QDomDocument cannot parse HTML. It's only for XML (and the documentation doen't even recommend using in the first place.) Commented Feb 20, 2018 at 20:51
  • @MrEricSir is right, I tried QDomDocument and failed when I tried to parse "www.wikipedia.org". Refer to this document, it is old, but may be useful. It suggests some libraries to parse your HTML, (but you may be still need to read it using QNetworkAccessManager, QNetworkRequest, QNetworkReply) Commented Feb 20, 2018 at 23:15

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.