phannent
29th July 2008, 14:59
Hello,
I am trying to get a list of images from a page. I got as far as downloading the page and running some JavaScript on it. However the returned data is not what I was expecting. I call this:
QVariant listOfImages = webView.page()->mainFrame()->evaluateJavaScript("document.getElementsByTagName(\"img\")");
qDebug() << listOfImages;
The console window shows:
Debug: QVariant(QVariantMap, QMap(("length", QVariant(double, 20) ) ) )
Anybody know how I can extract the list of images?
I am trying to get a list of images from a page. I got as far as downloading the page and running some JavaScript on it. However the returned data is not what I was expecting. I call this:
QVariant listOfImages = webView.page()->mainFrame()->evaluateJavaScript("document.getElementsByTagName(\"img\")");
qDebug() << listOfImages;
The console window shows:
Debug: QVariant(QVariantMap, QMap(("length", QVariant(double, 20) ) ) )
Anybody know how I can extract the list of images?