nothing 추가

git-svn-id: svn://192.168.0.12/source@153 8346c931-da38-4b9b-9d4c-e48b93cbd075
This commit is contained in:
admin
2015-06-22 07:14:55 +00:00
parent 5659316e0a
commit c7ffe3d424
2 changed files with 18 additions and 4 deletions

View File

@@ -26,7 +26,7 @@ SCrawler::~SCrawler()
void SCrawler::load(QStringList _strlistArgv)
{
m_bUse = false;
m_bNothing = false;
if (_strlistArgv[0] == "naver")
{
if (_strlistArgv[1] == "news_list")
@@ -217,13 +217,25 @@ void SCrawler::saveResult(bool ok)
deleteProxy();
break;
}
if (m_bLast) cout << "last";
if (m_bNothing == false)
{
cout << "nothing";
m_bNothing = true;
}
if (m_bLast)
{
cout << "last";
m_bLast = false;
}
break;
case E_NAVER_BLOG_REPLY:
case E_DAUM_BLOG_REPLY:
cout << "ok";
if (m_bUse)
{
cout << "ok";
m_bUse = false;
}
break;
case E_NAVER_CAFE_DATA:
case E_NAVER_BLOG_BODY:
@@ -1584,6 +1596,7 @@ void SCrawler::saveFrameNewsList(QWebFrame *frame)
QString str = Find(eleSub,"a","class","go_naver").attribute("href");
if (str.trimmed().isEmpty()) continue;
if (str.contains("http://sports")) continue;
m_bNothing = true;
cout << "o " << str.toStdString() << endl;
}
}

View File

@@ -46,6 +46,7 @@ private:
bool m_bUse;
bool m_bLast;
bool m_bError;
bool m_bNothing;
QString m_strProxyIP;
int m_nProxyPort;