文件名称:qtscanner
介绍说明--下载内容均来自于网络,请自行研究使用
网页爬虫,QT实现。网页爬去分析。Crawler::Crawler(QUrl &url,QTreeWidget *tr) : QWidget() {
-
Crawler::~Crawler(){
http->abort()
delete http
delete tr_result
delete root
delete cookie_tr
}
Crawler::Crawler(QUrl &url,QTreeWidget*tr) : QWidget() {
http=new QHttp(this)
connect(http,SIGNAL(done(bool)),this,SLOT(getPage()))
//settings ...
QSettings settings
if(settings.value("network/useproxy").toBool())
{
http->setProxy(
settings.value("network/cra_host").toString(),
settings.value("network/cra_port").toInt(),
settings.value("network/cra_name").toString(),
settings.value("network/cra_pass").toString()
)
}
//the request ...
QHttpRequestHeader header
header.setValue("User-agent",settings.value("crawler/user-agent","Firefox 3").toString())
header.setValue("Host",url.host())
header.setRequest("GET",url.path())
http->setHost(url.host(),url.port(80))
-
Crawler::~Crawler(){
http->abort()
delete http
delete tr_result
delete root
delete cookie_tr
}
Crawler::Crawler(QUrl &url,QTreeWidget*tr) : QWidget() {
http=new QHttp(this)
connect(http,SIGNAL(done(bool)),this,SLOT(getPage()))
//settings ...
QSettings settings
if(settings.value("network/useproxy").toBool())
{
http->setProxy(
settings.value("network/cra_host").toString(),
settings.value("network/cra_port").toInt(),
settings.value("network/cra_name").toString(),
settings.value("network/cra_pass").toString()
)
}
//the request ...
QHttpRequestHeader header
header.setValue("User-agent",settings.value("crawler/user-agent","Firefox 3").toString())
header.setValue("Host",url.host())
header.setRequest("GET",url.path())
http->setHost(url.host(),url.port(80))
(系统自动生成,下载前可以参看下载内容)
下载文件列表
qtscanner\2GWVS.pro
.........\2GWVS.pro.user
.........\2gwvs.qrc
.........\database\2gwvs.db3
.........\gpl.txt
.........\img\2gwvs-logo.png
.........\...\2gwvs.ico
.........\...\crawler.ico
.........\...\edit_pref.ico
.........\Makefile
.........\Makefile.Debug
.........\Makefile.Release
.........\object_script.2gwvs.Debug
.........\object_script.2gwvs.Release
.........\qrc_2gwvs.cpp
.........\rcc.exe
.........\src\crawler.cpp
.........\...\crawler.h
.........\...\formCatched.cpp
.........\...\formCatched.h
.........\...\issuesDatabase.cpp
.........\...\issuesDatabase.h
.........\...\issuesExecuter.cpp
.........\...\issuesExecuter.h
.........\...\main.cpp
.........\...\mainWindow.cpp
.........\...\mainWindow.h
.........\...\preferences.h
.........\...\runScanner.cpp
.........\...\runScanner.h
.........\...\urlCatched.cpp
.........\...\urlCatched.h
.........\...\urlTreeItem.cpp
.........\...\urlTreeItem.h
.........\...\urlTreeModel.cpp
.........\...\urlTreeModel.h
.........\...\webView.cpp
.........\...\webView.h
.........\ui\main.ui
.........\..\preferences.ui
.........\..\runScanner.ui
.........\..\webView.ui
.........\ui_main.h
.........\ui_preferences.h
.........\ui_runScanner.h
.........\ui_webView.h
.........\database
.........\debug
.........\img
.........\release
.........\src
.........\ui
qtscanner