We have moved to a new Sailfish OS Forum. Please start new discussions there.
1 | initial version | posted 2016-12-18 19:03:35 +0200 |
Hi I want to develop an app for Sailfish and I need to read some data from a website. What do I use writing a simple crawler? I'm reading my website using QNetworkRequest. But I don't know what to use to parse the HTML. This is what I have now:
void CCrawler::replyFinished(QNetworkReply* pReply) {
QByteArray data = pReply->readAll();
QString str(data);
//QWebPage page;
QWebFrame *frame = new QWebFrame();
frame->mainFrame()->setHtml(str);
QWebElement document = frame->documentElement();
QWebElementCollection elements = document.findAll("a");
foreach (QWebElement element, elements)
qDebug() << element.toInnerXml();
}
But I get an error:
invalid use of incomplete type 'class QWebFrame
2 | No.2 Revision |
Hi I want to develop an app for Sailfish and I need to read some data from a website. What do I use for writing a simple crawler? I'm reading my website using QNetworkRequest. But I don't know what to use to parse the HTML. This is what I have now:
void CCrawler::replyFinished(QNetworkReply* pReply) {
QByteArray data = pReply->readAll();
QString str(data);
//QWebPage page;
QWebFrame *frame = new QWebFrame();
frame->mainFrame()->setHtml(str);
QWebElement document = frame->documentElement();
QWebElementCollection elements = document.findAll("a");
foreach (QWebElement element, elements)
qDebug() << element.toInnerXml();
}
But I get an error:
invalid use of incomplete type 'class QWebFrame
3 | retagged |
Hi I want to develop an app for Sailfish and I need to read some data from a website. What do I use for writing a simple crawler? I'm reading my website using QNetworkRequest. But I don't know what to use to parse the HTML. This is what I have now:
void CCrawler::replyFinished(QNetworkReply* pReply) {
QByteArray data = pReply->readAll();
QString str(data);
//QWebPage page;
QWebFrame *frame = new QWebFrame();
frame->mainFrame()->setHtml(str);
QWebElement document = frame->documentElement();
QWebElementCollection elements = document.findAll("a");
foreach (QWebElement element, elements)
qDebug() << element.toInnerXml();
}
But I get an error:
invalid use of incomplete type 'class QWebFrame
4 | No.4 Revision |
Hi I want to develop an app for Sailfish and I need to read some data from a website. What do I use for writing a simple crawler?
I'm reading my website using QNetworkRequest. But I don't know what to use to parse the HTML. This is what I have now:
void CCrawler::replyFinished(QNetworkReply* pReply) {
QByteArray data = pReply->readAll();
QString str(data);
//QWebPage page;
QWebFrame *frame = new QWebFrame();
frame->mainFrame()->setHtml(str);
QWebElement document = frame->documentElement();
QWebElementCollection elements = document.findAll("a");
foreach (QWebElement element, elements)
qDebug() << element.toInnerXml();
}
But I get an error:
invalid use of incomplete type 'class QWebFrame
5 | No.5 Revision |
I want to develop an app for Sailfish and I need to read some data from a website. What do I use for writing a simple crawler?
crawler?
I'm reading my website using QNetworkRequest. But I don't know what to use to parse the HTML. This is what I have now:
void CCrawler::replyFinished(QNetworkReply* pReply) {
QByteArray data = pReply->readAll();
QString str(data);
//QWebPage page;
QWebFrame *frame = new QWebFrame();
frame->mainFrame()->setHtml(str);
QWebElement document = frame->documentElement();
QWebElementCollection elements = document.findAll("a");
foreach (QWebElement element, elements)
qDebug() << element.toInnerXml();
}
But I get an error:
invalid use of incomplete type 'class class QWebFrame