blog 크롤러 무한 리로드 버그 수정
git-svn-id: svn://192.168.0.12/source@221 8346c931-da38-4b9b-9d4c-e48b93cbd075
This commit is contained in:
@@ -6,10 +6,11 @@
|
||||
#include <QDebug>
|
||||
#include <QTimer>
|
||||
|
||||
#define BLOG_RETRY_MAX 4
|
||||
#define BLOG_RETRY_INTERVAL 3000
|
||||
using namespace std;
|
||||
|
||||
const int BLOG_RETRY_MAX = 4;
|
||||
const int BLOG_RETRY_INTERVAL = 3000;
|
||||
|
||||
struct SProxyList
|
||||
{
|
||||
QString m_strAddress;
|
||||
@@ -611,9 +612,10 @@ bool SCrawler::saveFrameUrl(QWebFrame *frame)
|
||||
|
||||
|
||||
//retry if profile is empty and sympathy is empty
|
||||
if(strProfile.isEmpty() || sympathy.isEmpty() && (m_nBlogRetryCount < BLOG_RETRY_MAX))
|
||||
if((strProfile.isEmpty() || sympathy.isEmpty()) && (m_nBlogRetryCount < BLOG_RETRY_MAX))
|
||||
{
|
||||
m_nBlogRetryCount++;
|
||||
qDebug() << m_nBlogRetryCount;
|
||||
QTimer::singleShot(BLOG_RETRY_INTERVAL, this, SLOT(crawlBlog()));
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user