naver blog accuracy 추가

git-svn-id: svn://192.168.0.12/source@264 8346c931-da38-4b9b-9d4c-e48b93cbd075
This commit is contained in:
admin
2016-05-13 06:34:13 +00:00
parent f3f0395e31
commit 7a2e6915ba

View File

@@ -724,7 +724,7 @@ void SCrawler::saveFrameComment(QWebFrame *frame)
QString strParent,strDate,strNick,strComm,strUrl,strId;
QStringList strList = m_strUrl.split("/");
QString strCommUrl;
for (int i=0; i < 5; i++)
for (int i=0; i < strList.size(); i++)
strUrl += strList.at(i) + "/";
strUrl = strUrl.left(strUrl.size()-1);
@@ -770,8 +770,12 @@ void SCrawler::saveFrameComment(QWebFrame *frame)
else
query.prepare(QString("insert into " + m_strTable + " (article_url,platform_id,article_nickname,article_data,article_date,reply_url,article_order,platform_name,platform_form,article_form) VALUES (:URL,:PLATFORMID,:NICK,:DATA,:DATE,:URLREPLY,:ROWNUM,'naver','blog','reply')").toUtf8());
int nStartIdPos = strUrl.indexOf("blogId=") + QString("blogId=").size();
int nEndIdPos = strUrl.indexOf('&', nStartIdPos);
query.bindValue(":URL", strUrl.toUtf8());
query.bindValue(":PLATFORMID",strUrl.split("/").at(3).toUtf8());
query.bindValue(":PLATFORMID",strUrl.mid(nStartIdPos, nEndIdPos - nStartIdPos));
query.bindValue(":NICK",strNick.toUtf8());
query.bindValue(":DATA",strComm.toUtf8());
query.bindValue(":DATE",strDate.toUtf8());
@@ -825,8 +829,11 @@ void SCrawler::saveFrameComment(QWebFrame *frame)
else
query.prepare(QString("insert into " + m_strTable + " (article_url,platform_id,article_nickname,article_data,article_date,article_parent,reply_url,article_order,platform_name,platform_form,article_form) VALUES (:URL,:PLATFORMID,:NICK,:DATA,:DATE,:PARENT,:URLREPLY,:ROWNUM,'naver','blog','reply')").toUtf8());
int nStartIdPos = strUrl.indexOf("blogId=") + QString("blogId=").size();
int nEndIdPos = strUrl.indexOf('&', nStartIdPos);
query.bindValue(":URL",strUrl.toUtf8());
query.bindValue(":PLATFORMID",strUrl.split("/").at(3).toUtf8());
query.bindValue(":PLATFORMID",strUrl.mid(nStartIdPos, nEndIdPos - nStartIdPos));
query.bindValue(":NICK",strNick.toUtf8());
query.bindValue(":DATA",strComm.toUtf8());
query.bindValue(":DATE",strDate.toUtf8());