From 6c08c475e86a45c5b0249be18796caf0d1d8c125 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 4 May 2015 08:44:36 +0000 Subject: [PATCH] =?UTF-8?q?reload=202=EB=B2=88=EB=90=98=EB=8A=94=20?= =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=A7=88?= =?UTF-8?q?=EC=9D=B4=EB=84=88=EC=8A=A4=EA=B0=80=20=EB=90=98=EB=8A=94=20?= =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://192.168.0.12/source@88 8346c931-da38-4b9b-9d4c-e48b93cbd075 --- CrawlerProcess/CrawlerProcess.pro | 2 +- CrawlerProcess/main.cpp | 2 ++ CrawlerProcess/scrawler.cpp | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CrawlerProcess/CrawlerProcess.pro b/CrawlerProcess/CrawlerProcess.pro index 9a4b9f7..780638e 100644 --- a/CrawlerProcess/CrawlerProcess.pro +++ b/CrawlerProcess/CrawlerProcess.pro @@ -3,7 +3,7 @@ # Project created by QtCreator 2014-10-13T04:17:40 # #------------------------------------------------- -QT += webkitwidgets network widgets sql +QT += webkitwidgets network widgets sql webkit TARGET = CrawlerProcess CONFIG += console diff --git a/CrawlerProcess/main.cpp b/CrawlerProcess/main.cpp index 440ccd2..3d3e29a 100644 --- a/CrawlerProcess/main.cpp +++ b/CrawlerProcess/main.cpp @@ -15,6 +15,8 @@ int main(int argc, char *argv[]) a.setApplicationName(QString("Chrome")); a.setApplicationVersion(QString("39.0.2171.95")); + + QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL"); db.setHostName("bigbird.iptime.org"); db.setUserName("admin"); diff --git a/CrawlerProcess/scrawler.cpp b/CrawlerProcess/scrawler.cpp index d611d6a..fb233cc 100644 --- a/CrawlerProcess/scrawler.cpp +++ b/CrawlerProcess/scrawler.cpp @@ -151,7 +151,7 @@ void SCrawler::saveResult(bool ok) { if (!ok) { - std::cerr << "Failed loading " << qPrintable(m_page->mainFrame()->url().toString()) << std::endl; + std::cerr << "Failed loading";// << qPrintable(m_page->mainFrame()->url().toString());// << std::endl; emit finished(); return; } @@ -1351,6 +1351,7 @@ void SCrawler::setProxy() //cout << "p : " << strList.at(0).toStdString() << ", " << strList.at(1).toStdString() << endl; cout << "p : " << strList.at(0).toStdString() << endl; QNetworkProxy::setApplicationProxy(*(new QNetworkProxy(QNetworkProxy::HttpProxy,strList.at(0),strList.at(1).toInt()))); + //QNetworkProxy::setApplicationProxy(*(new QNetworkProxy(QNetworkProxy::HttpProxy,"101.69.199.99",80))); break; } }