34 lines
812 B
C++
34 lines
812 B
C++
#ifndef SNEWSCRAWLER_H
|
|
#define SNEWSCRAWLER_H
|
|
|
|
#include <QWebPage>
|
|
#include <QObject>
|
|
#include <QThreadPool>
|
|
|
|
#include "sreplygetmanage.h"
|
|
|
|
class SNewsCrawler : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit SNewsCrawler(QObject *parent = 0);
|
|
~SNewsCrawler();
|
|
void load(QStringList _strlistArgv);
|
|
void Debug(QString _strFilename,QString _strData);
|
|
signals:
|
|
void finished();
|
|
private slots:
|
|
void saveResult(bool ok);
|
|
private:
|
|
QWebPage *m_page;
|
|
QString m_strUrl;
|
|
SReplyGetManage m_reply;
|
|
SCrawlerData m_data;
|
|
bool m_bUse;
|
|
private:
|
|
QWebElement Find(const QWebElement _FindElement,const QString _strElement,const QString _strAttrib,const QString _strFind);
|
|
void saveFrame(QWebFrame *frame);
|
|
};
|
|
|
|
#endif // SNEWSCRAWLER_H
|