开发者

Qt - webkit - how to extract images out of a web page

开发者 https://www.devze.com 2023-03-20 09:41 出处:网络
I am trying to extract the images from the given web page. I have gone through \"Simple Selector Example\" and \"DOM Traversal Example\" .But, they refer text-things not image. I have made a code to g

I am trying to extract the images from the given web page. I have gone through "Simple Selector Example" and "DOM Traversal Example" . But, they refer text-things not image. I have made a code to get a QNetWorkReply by sending QNetworkRequest through QNetworkManager. But, I can't get how to bring images using it. Qt-Webkit enlightened ones are asked to shed a lig开发者_开发百科ht on this.


QWebElement has tagName and attributeNames, you want to search for an img tag with a src attribute.

You can download URLs with QNetworkAccessManager.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号