'.'
This commit is contained in:
1001
app/10.csv
Normal file
1001
app/10.csv
Normal file
File diff suppressed because it is too large
Load Diff
10001
app/100.csv
Normal file
10001
app/100.csv
Normal file
File diff suppressed because it is too large
Load Diff
200001
app/2000.csv
Normal file
200001
app/2000.csv
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"detect_register": false,
|
"detect_register": true,
|
||||||
"detect_chinaz": false,
|
"detect_chinaz": true,
|
||||||
"detect_aizhan": false,
|
"detect_aizhan": true,
|
||||||
"detect_baidu_site": false,
|
"detect_baidu_site": true,
|
||||||
"detect_360_site": false,
|
"detect_360_site": true,
|
||||||
"detect_baidu_security": false,
|
"detect_baidu_security": true,
|
||||||
"detect_whois": false,
|
"detect_whois": true,
|
||||||
"detect_beian": true,
|
"detect_beian": true,
|
||||||
"detect_intercept": false,
|
"detect_intercept": true,
|
||||||
"detect_juziseo": false,
|
"detect_juziseo": true,
|
||||||
"detect_juziseo_outlink": false
|
"detect_juziseo_outlink": true
|
||||||
}
|
}
|
||||||
Binary file not shown.
Binary file not shown.
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"thread_count": "1"
|
"thread_count": "100"
|
||||||
}
|
}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -295,6 +295,13 @@ class QueryThread(QThread):
|
|||||||
domains = db.get_domains_with_details(self.conditions, page=self.page, page_size=self.page_size)
|
domains = db.get_domains_with_details(self.conditions, page=self.page, page_size=self.page_size)
|
||||||
# 获取符合条件的域名总数
|
# 获取符合条件的域名总数
|
||||||
total_count = db.get_domains_count(self.conditions)
|
total_count = db.get_domains_count(self.conditions)
|
||||||
|
|
||||||
|
# 一次性获取所有域名的检测状态,避免在UI线程中执行数据库操作
|
||||||
|
for domain in domains:
|
||||||
|
domain_id = domain['id']
|
||||||
|
detect_statuses = db.get_detection_statuses(domain_id)
|
||||||
|
domain['detect_statuses'] = detect_statuses
|
||||||
|
|
||||||
self.finished.emit(domains, self.conditions, total_count)
|
self.finished.emit(domains, self.conditions, total_count)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.error.emit(str(e))
|
self.error.emit(str(e))
|
||||||
@@ -875,8 +882,8 @@ class DomainFilterWidget(QWidget):
|
|||||||
|
|
||||||
# 创建表格
|
# 创建表格
|
||||||
self.table_widget = QTableWidget()
|
self.table_widget = QTableWidget()
|
||||||
self.table_widget.setColumnCount(18)
|
self.table_widget.setColumnCount(23)
|
||||||
self.table_widget.setHorizontalHeaderLabels(["域名", "注册状态", "使用状态", "检测状态", "复核状态", "域名过期时间", "单位性质", "首页地址", "检测时间", "备案历史", "备案年份", "快照年份", "百度历史收录状态", "百度site收录状态", "title是否有中文", "360site收录", "Google site收录状态", "友情链接数量"])
|
self.table_widget.setHorizontalHeaderLabels(["域名", "注册状态", "使用状态", "检测状态", "复核状态", "域名过期时间", "单位性质", "首页地址", "检测时间", "备案历史", "备案年份", "快照年份", "百度历史收录状态", "百度site收录状态", "title是否有中文", "360site收录", "Google site收录状态", "友情链接数量", "WHOIS检测", "备案检测", "拦截检测", "桔子历史", "桔子外链"])
|
||||||
# 设置表格水平滚动
|
# 设置表格水平滚动
|
||||||
self.table_widget.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
|
self.table_widget.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
|
||||||
# 设置列宽调整模式
|
# 设置列宽调整模式
|
||||||
@@ -917,6 +924,7 @@ class DomainFilterWidget(QWidget):
|
|||||||
beian_year = self.beian_year_input.text().strip()
|
beian_year = self.beian_year_input.text().strip()
|
||||||
snapshot_year = self.snapshot_year_input.text().strip()
|
snapshot_year = self.snapshot_year_input.text().strip()
|
||||||
backlink = self.backlink_checkbox.isChecked()
|
backlink = self.backlink_checkbox.isChecked()
|
||||||
|
beian = self.beian_checkbox.isChecked()
|
||||||
search_keyword = self.search_input.text().strip()
|
search_keyword = self.search_input.text().strip()
|
||||||
page = self.page_spinbox.value()
|
page = self.page_spinbox.value()
|
||||||
page_size = self.page_size_spinbox.value()
|
page_size = self.page_size_spinbox.value()
|
||||||
@@ -968,6 +976,7 @@ class DomainFilterWidget(QWidget):
|
|||||||
'beian_year': beian_year,
|
'beian_year': beian_year,
|
||||||
'snapshot_year': snapshot_year,
|
'snapshot_year': snapshot_year,
|
||||||
'backlink_gt_10': backlink if backlink else None,
|
'backlink_gt_10': backlink if backlink else None,
|
||||||
|
'has_beian': 2 if beian else None,
|
||||||
'search_keyword': search_keyword,
|
'search_keyword': search_keyword,
|
||||||
'website_url': website_url if website_url else None
|
'website_url': website_url if website_url else None
|
||||||
}
|
}
|
||||||
@@ -985,18 +994,15 @@ class DomainFilterWidget(QWidget):
|
|||||||
"""
|
"""
|
||||||
查询完成回调
|
查询完成回调
|
||||||
"""
|
"""
|
||||||
# 清空表格
|
try:
|
||||||
self.table_widget.setRowCount(0)
|
# 清空表格
|
||||||
|
self.table_widget.setRowCount(0)
|
||||||
# 添加数据到表格
|
|
||||||
for domain in domains:
|
|
||||||
row = self.table_widget.rowCount()
|
|
||||||
self.table_widget.insertRow(row)
|
|
||||||
|
|
||||||
# 域名
|
# 预设置表格行数,减少UI更新次数
|
||||||
self.table_widget.setItem(row, 0, QTableWidgetItem(domain['domain']))
|
num_rows = len(domains)
|
||||||
|
self.table_widget.setRowCount(num_rows)
|
||||||
|
|
||||||
# 注册状态
|
# 定义状态映射字典,避免在循环中重复创建
|
||||||
register_status_mapping = {
|
register_status_mapping = {
|
||||||
0: '待检测',
|
0: '待检测',
|
||||||
1: '已注册',
|
1: '已注册',
|
||||||
@@ -1005,20 +1011,14 @@ class DomainFilterWidget(QWidget):
|
|||||||
4: '赎回期',
|
4: '赎回期',
|
||||||
5: '删除期'
|
5: '删除期'
|
||||||
}
|
}
|
||||||
register_status = register_status_mapping.get(domain['register_status'], '未知')
|
|
||||||
self.table_widget.setItem(row, 1, QTableWidgetItem(register_status))
|
|
||||||
|
|
||||||
# 使用状态
|
|
||||||
use_status_mapping = {
|
use_status_mapping = {
|
||||||
0: '未使用',
|
0: '未使用',
|
||||||
1: '已经使用',
|
1: '已经使用',
|
||||||
2: '已经卖出',
|
2: '已经卖出',
|
||||||
3: '已经预定'
|
3: '已经预定'
|
||||||
}
|
}
|
||||||
use_status = use_status_mapping.get(domain['use_status'], '未知')
|
|
||||||
self.table_widget.setItem(row, 2, QTableWidgetItem(use_status))
|
|
||||||
|
|
||||||
# 检测状态
|
|
||||||
detect_status_mapping = {
|
detect_status_mapping = {
|
||||||
0: '待检测',
|
0: '待检测',
|
||||||
1: '检测完成',
|
1: '检测完成',
|
||||||
@@ -1026,121 +1026,164 @@ class DomainFilterWidget(QWidget):
|
|||||||
3: '黑名单',
|
3: '黑名单',
|
||||||
4: '检测失败'
|
4: '检测失败'
|
||||||
}
|
}
|
||||||
detect_status = detect_status_mapping.get(domain['detect_status'], '未知')
|
|
||||||
self.table_widget.setItem(row, 3, QTableWidgetItem(detect_status))
|
|
||||||
|
|
||||||
# 复核状态
|
|
||||||
review_status_mapping = {
|
review_status_mapping = {
|
||||||
0: '无需复核',
|
0: '无需复核',
|
||||||
1: '待人工复核',
|
1: '待人工复核',
|
||||||
2: '人工通过',
|
2: '人工通过',
|
||||||
3: '人工拒绝'
|
3: '人工拒绝'
|
||||||
}
|
}
|
||||||
review_status = review_status_mapping.get(domain['review_status'], '未知')
|
|
||||||
self.table_widget.setItem(row, 4, QTableWidgetItem(review_status))
|
|
||||||
|
|
||||||
# 域名过期时间
|
|
||||||
expire_date = domain.get('expire_date', '')
|
|
||||||
self.table_widget.setItem(row, 5, QTableWidgetItem(str(expire_date) if expire_date else ''))
|
|
||||||
|
|
||||||
# 单位性质
|
|
||||||
company_type = domain.get('company_type', '')
|
|
||||||
self.table_widget.setItem(row, 6, QTableWidgetItem(company_type))
|
|
||||||
|
|
||||||
# 首页地址
|
|
||||||
home_url = domain.get('website_url', '')
|
|
||||||
self.table_widget.setItem(row, 7, QTableWidgetItem(home_url))
|
|
||||||
|
|
||||||
# 检测时间
|
|
||||||
detect_time = domain.get('detect_time', '')
|
|
||||||
self.table_widget.setItem(row, 8, QTableWidgetItem(str(detect_time) if detect_time else ''))
|
|
||||||
|
|
||||||
# 备案历史
|
|
||||||
has_beian_mapping = {
|
has_beian_mapping = {
|
||||||
1: '待检测',
|
1: '待检测',
|
||||||
2: '有备案记录',
|
2: '有备案记录',
|
||||||
3: '没有备案记录'
|
3: '没有备案记录'
|
||||||
}
|
}
|
||||||
has_beian = has_beian_mapping.get(domain.get('has_beian'), '未知')
|
|
||||||
self.table_widget.setItem(row, 9, QTableWidgetItem(has_beian))
|
|
||||||
|
|
||||||
# 备案年份
|
# 添加数据到表格
|
||||||
beian_year = domain.get('beian_year', '')
|
for row, domain in enumerate(domains):
|
||||||
self.table_widget.setItem(row, 10, QTableWidgetItem(str(beian_year) if beian_year else ''))
|
# 域名
|
||||||
|
self.table_widget.setItem(row, 0, QTableWidgetItem(domain['domain']))
|
||||||
# 快照年份
|
|
||||||
snapshot_years = domain.get('snapshot_years', '')
|
# 注册状态
|
||||||
self.table_widget.setItem(row, 11, QTableWidgetItem(snapshot_years))
|
register_status = register_status_mapping.get(domain['register_status'], '未知')
|
||||||
|
self.table_widget.setItem(row, 1, QTableWidgetItem(register_status))
|
||||||
# 百度历史收录状态
|
|
||||||
baidu_history = domain.get('baidu_history')
|
# 使用状态
|
||||||
if baidu_history is None:
|
use_status = use_status_mapping.get(domain['use_status'], '未知')
|
||||||
baidu_history = {}
|
self.table_widget.setItem(row, 2, QTableWidgetItem(use_status))
|
||||||
elif isinstance(baidu_history, str):
|
|
||||||
import json
|
# 检测状态
|
||||||
try:
|
detect_status = detect_status_mapping.get(domain['detect_status'], '未知')
|
||||||
baidu_history = json.loads(baidu_history)
|
self.table_widget.setItem(row, 3, QTableWidgetItem(detect_status))
|
||||||
except:
|
|
||||||
|
# 复核状态
|
||||||
|
review_status = review_status_mapping.get(domain['review_status'], '未知')
|
||||||
|
self.table_widget.setItem(row, 4, QTableWidgetItem(review_status))
|
||||||
|
|
||||||
|
# 域名过期时间
|
||||||
|
expire_date = domain.get('expire_date', '')
|
||||||
|
self.table_widget.setItem(row, 5, QTableWidgetItem(str(expire_date) if expire_date else ''))
|
||||||
|
|
||||||
|
# 单位性质
|
||||||
|
company_type = domain.get('company_type', '')
|
||||||
|
self.table_widget.setItem(row, 6, QTableWidgetItem(company_type))
|
||||||
|
|
||||||
|
# 首页地址
|
||||||
|
home_url = domain.get('website_url', '')
|
||||||
|
self.table_widget.setItem(row, 7, QTableWidgetItem(home_url))
|
||||||
|
|
||||||
|
# 检测时间
|
||||||
|
detect_time = domain.get('detect_time', '')
|
||||||
|
self.table_widget.setItem(row, 8, QTableWidgetItem(str(detect_time) if detect_time else ''))
|
||||||
|
|
||||||
|
# 备案历史
|
||||||
|
has_beian = has_beian_mapping.get(domain.get('has_beian'), '未知')
|
||||||
|
self.table_widget.setItem(row, 9, QTableWidgetItem(has_beian))
|
||||||
|
|
||||||
|
# 备案年份
|
||||||
|
beian_year = domain.get('beian_year', '')
|
||||||
|
self.table_widget.setItem(row, 10, QTableWidgetItem(str(beian_year) if beian_year else ''))
|
||||||
|
|
||||||
|
# 快照年份
|
||||||
|
snapshot_years = domain.get('snapshot_years', '')
|
||||||
|
self.table_widget.setItem(row, 11, QTableWidgetItem(snapshot_years))
|
||||||
|
|
||||||
|
# 百度历史收录状态
|
||||||
|
baidu_history = domain.get('baidu_history')
|
||||||
|
if baidu_history is None:
|
||||||
baidu_history = {}
|
baidu_history = {}
|
||||||
baidu_history_status = '是' if baidu_history.get('status') else '否'
|
elif isinstance(baidu_history, str):
|
||||||
self.table_widget.setItem(row, 12, QTableWidgetItem(baidu_history_status))
|
import json
|
||||||
|
try:
|
||||||
# 百度site收录状态
|
baidu_history = json.loads(baidu_history)
|
||||||
baidu_site = domain.get('baidu_site')
|
except:
|
||||||
if baidu_site is None:
|
baidu_history = {}
|
||||||
baidu_site = {}
|
baidu_history_status = '是' if baidu_history.get('status') else '否'
|
||||||
elif isinstance(baidu_site, str):
|
self.table_widget.setItem(row, 12, QTableWidgetItem(baidu_history_status))
|
||||||
import json
|
|
||||||
try:
|
# 百度site收录状态
|
||||||
baidu_site = json.loads(baidu_site)
|
baidu_site = domain.get('baidu_site')
|
||||||
except:
|
if baidu_site is None:
|
||||||
baidu_site = {}
|
baidu_site = {}
|
||||||
baidu_site_status = '是' if baidu_site.get('status') else '否'
|
elif isinstance(baidu_site, str):
|
||||||
self.table_widget.setItem(row, 13, QTableWidgetItem(baidu_site_status))
|
import json
|
||||||
|
try:
|
||||||
# title是否有中文
|
baidu_site = json.loads(baidu_site)
|
||||||
is_chinese_title = domain.get('is_chinese_title', False)
|
except:
|
||||||
is_chinese_title_text = '是' if is_chinese_title else '否'
|
baidu_site = {}
|
||||||
self.table_widget.setItem(row, 14, QTableWidgetItem(is_chinese_title_text))
|
baidu_site_status = '是' if baidu_site.get('status') else '否'
|
||||||
|
self.table_widget.setItem(row, 13, QTableWidgetItem(baidu_site_status))
|
||||||
# 360site收录
|
|
||||||
qihu360_site = domain.get('qihu360_site')
|
# title是否有中文
|
||||||
if qihu360_site is None:
|
is_chinese_title = domain.get('is_chinese_title', False)
|
||||||
qihu360_site = {}
|
is_chinese_title_text = '是' if is_chinese_title else '否'
|
||||||
elif isinstance(qihu360_site, str):
|
self.table_widget.setItem(row, 14, QTableWidgetItem(is_chinese_title_text))
|
||||||
import json
|
|
||||||
try:
|
# 360site收录
|
||||||
qihu360_site = json.loads(qihu360_site)
|
qihu360_site = domain.get('qihu360_site')
|
||||||
except:
|
if qihu360_site is None:
|
||||||
qihu360_site = {}
|
qihu360_site = {}
|
||||||
qihu360_site_status = '是' if qihu360_site.get('status') else '否'
|
elif isinstance(qihu360_site, str):
|
||||||
self.table_widget.setItem(row, 15, QTableWidgetItem(qihu360_site_status))
|
import json
|
||||||
|
try:
|
||||||
# Google site收录状态
|
qihu360_site = json.loads(qihu360_site)
|
||||||
google_site = domain.get('google_site')
|
except:
|
||||||
if google_site is None:
|
qihu360_site = {}
|
||||||
google_site = {}
|
qihu360_site_status = '是' if qihu360_site.get('status') else '否'
|
||||||
elif isinstance(google_site, str):
|
self.table_widget.setItem(row, 15, QTableWidgetItem(qihu360_site_status))
|
||||||
import json
|
|
||||||
try:
|
# Google site收录状态
|
||||||
google_site = json.loads(google_site)
|
google_site = domain.get('google_site')
|
||||||
except:
|
if google_site is None:
|
||||||
google_site = {}
|
google_site = {}
|
||||||
google_site_status = '是' if google_site.get('status') else '否'
|
elif isinstance(google_site, str):
|
||||||
self.table_widget.setItem(row, 16, QTableWidgetItem(google_site_status))
|
import json
|
||||||
|
try:
|
||||||
|
google_site = json.loads(google_site)
|
||||||
|
except:
|
||||||
|
google_site = {}
|
||||||
|
google_site_status = '是' if google_site.get('status') else '否'
|
||||||
|
self.table_widget.setItem(row, 16, QTableWidgetItem(google_site_status))
|
||||||
|
|
||||||
|
# 友情链接数量
|
||||||
|
backlink_count = domain.get('backlink_count', 0)
|
||||||
|
self.table_widget.setItem(row, 17, QTableWidgetItem(str(backlink_count)))
|
||||||
|
|
||||||
|
# 检测状态
|
||||||
|
# 使用在后台线程中获取的检测状态
|
||||||
|
detect_statuses = domain.get('detect_statuses', {})
|
||||||
|
|
||||||
|
# WHOIS检测状态
|
||||||
|
whois_status = '已检测' if detect_statuses.get('whois_status') == 1 else '待检测'
|
||||||
|
self.table_widget.setItem(row, 18, QTableWidgetItem(whois_status))
|
||||||
|
|
||||||
|
# 备案检测状态
|
||||||
|
beian_status = '已检测' if detect_statuses.get('beian_status') == 1 else '待检测'
|
||||||
|
self.table_widget.setItem(row, 19, QTableWidgetItem(beian_status))
|
||||||
|
|
||||||
|
# 拦截检测状态
|
||||||
|
intercept_status = '已检测' if detect_statuses.get('intercept_status') == 1 else '待检测'
|
||||||
|
self.table_widget.setItem(row, 20, QTableWidgetItem(intercept_status))
|
||||||
|
|
||||||
|
# 桔子历史检测状态
|
||||||
|
juziseo_history_status = '已检测' if detect_statuses.get('juziseo_history_status') == 1 else '待检测'
|
||||||
|
self.table_widget.setItem(row, 21, QTableWidgetItem(juziseo_history_status))
|
||||||
|
|
||||||
|
# 桔子外链检测状态
|
||||||
|
juziseo_outlink_status = '已检测' if detect_statuses.get('juziseo_outlink_status') == 1 else '待检测'
|
||||||
|
self.table_widget.setItem(row, 22, QTableWidgetItem(juziseo_outlink_status))
|
||||||
|
|
||||||
# 友情链接数量
|
# 显示查询结果,包括总数、总页数和当前页码
|
||||||
backlink_count = domain.get('backlink_count', 0)
|
current_page_count = len(domains)
|
||||||
self.table_widget.setItem(row, 17, QTableWidgetItem(str(backlink_count)))
|
page_size = self.page_size_spinbox.value()
|
||||||
|
total_pages = (total_count + page_size - 1) // page_size # 向上取整计算总页数
|
||||||
# 显示查询结果,包括总数、总页数和当前页码
|
current_page = self.page_spinbox.value()
|
||||||
current_page_count = len(domains)
|
self.status_label.setText(f"查询完成,共 {total_count} 条记录,当前页显示 {current_page_count} 条,共 {total_pages} 页,当前第 {current_page} 页")
|
||||||
page_size = self.page_size_spinbox.value()
|
logger.info(f"查询完成,共 {total_count} 条记录,当前页显示 {current_page_count} 条,共 {total_pages} 页,当前第 {current_page} 页")
|
||||||
total_pages = (total_count + page_size - 1) // page_size # 向上取整计算总页数
|
except Exception as e:
|
||||||
current_page = self.page_spinbox.value()
|
self.status_label.setText(f"处理查询结果时出错: {str(e)}")
|
||||||
self.status_label.setText(f"查询完成,共 {total_count} 条记录,当前页显示 {current_page_count} 条,共 {total_pages} 页,当前第 {current_page} 页")
|
logger.error(f"处理查询结果时出错: {e}")
|
||||||
logger.info(f"查询完成,共 {total_count} 条记录,当前页显示 {current_page_count} 条,共 {total_pages} 页,当前第 {current_page} 页")
|
|
||||||
|
|
||||||
def on_query_error(self, error):
|
def on_query_error(self, error):
|
||||||
"""
|
"""
|
||||||
查询错误回调
|
查询错误回调
|
||||||
@@ -1152,56 +1195,288 @@ class DomainFilterWidget(QWidget):
|
|||||||
"""
|
"""
|
||||||
导出域名
|
导出域名
|
||||||
"""
|
"""
|
||||||
# 获取当前表格中的域名数据
|
from PySide6.QtWidgets import QMessageBox
|
||||||
domains = []
|
|
||||||
for row in range(self.table_widget.rowCount()):
|
|
||||||
domain = {
|
|
||||||
'domain': self.table_widget.item(row, 0).text(),
|
|
||||||
'register_status': self.table_widget.item(row, 1).text(),
|
|
||||||
'use_status': self.table_widget.item(row, 2).text(),
|
|
||||||
'detect_status': self.table_widget.item(row, 3).text(),
|
|
||||||
'review_status': self.table_widget.item(row, 4).text(),
|
|
||||||
'expire_date': self.table_widget.item(row, 5).text(),
|
|
||||||
'company_type': self.table_widget.item(row, 6).text(),
|
|
||||||
'website_url': self.table_widget.item(row, 7).text(),
|
|
||||||
'detect_time': self.table_widget.item(row, 8).text(),
|
|
||||||
'has_beian': self.table_widget.item(row, 9).text(),
|
|
||||||
'beian_year': self.table_widget.item(row, 10).text(),
|
|
||||||
'snapshot_years': self.table_widget.item(row, 11).text(),
|
|
||||||
'baidu_history': self.table_widget.item(row, 12).text(),
|
|
||||||
'baidu_site': self.table_widget.item(row, 13).text(),
|
|
||||||
'is_chinese_title': self.table_widget.item(row, 14).text(),
|
|
||||||
'qihu360_site': self.table_widget.item(row, 15).text(),
|
|
||||||
'google_site': self.table_widget.item(row, 16).text(),
|
|
||||||
'backlink_count': self.table_widget.item(row, 17).text()
|
|
||||||
}
|
|
||||||
domains.append(domain)
|
|
||||||
|
|
||||||
if not domains:
|
# 询问用户导出范围
|
||||||
self.status_label.setText("没有数据可导出")
|
msg_box = QMessageBox()
|
||||||
|
msg_box.setWindowTitle("导出范围")
|
||||||
|
msg_box.setText("请选择导出范围:")
|
||||||
|
msg_box.addButton("只导出当前页", QMessageBox.AcceptRole)
|
||||||
|
msg_box.addButton("导出所有页", QMessageBox.AcceptRole)
|
||||||
|
msg_box.addButton("导出指定页码范围", QMessageBox.AcceptRole)
|
||||||
|
msg_box.addButton("取消", QMessageBox.RejectRole)
|
||||||
|
|
||||||
|
result = msg_box.exec()
|
||||||
|
|
||||||
|
# 获取按钮文本
|
||||||
|
button_text = msg_box.clickedButton().text() if msg_box.clickedButton() else "取消"
|
||||||
|
|
||||||
|
if button_text == "取消":
|
||||||
return
|
return
|
||||||
|
|
||||||
|
start_page = 1
|
||||||
|
end_page = 1
|
||||||
|
|
||||||
|
if button_text == "导出指定页码范围":
|
||||||
|
# 创建页码范围输入对话框
|
||||||
|
from PySide6.QtWidgets import QDialog, QVBoxLayout, QLabel, QLineEdit, QPushButton, QHBoxLayout
|
||||||
|
dialog = QDialog(self)
|
||||||
|
dialog.setWindowTitle("导出指定页码范围")
|
||||||
|
dialog.resize(400, 150)
|
||||||
|
dialog.setModal(True) # 设置为模态对话框,确保获得焦点
|
||||||
|
|
||||||
|
layout = QVBoxLayout(dialog)
|
||||||
|
|
||||||
|
# 页码范围输入
|
||||||
|
range_label = QLabel("请输入页码范围(例如:2-6):")
|
||||||
|
layout.addWidget(range_label)
|
||||||
|
|
||||||
|
page_range_input = QLineEdit()
|
||||||
|
page_range_input.setPlaceholderText("例如:2-6")
|
||||||
|
layout.addWidget(page_range_input)
|
||||||
|
|
||||||
|
# 按钮布局
|
||||||
|
button_layout = QHBoxLayout()
|
||||||
|
|
||||||
|
ok_button = QPushButton("确定")
|
||||||
|
ok_button.clicked.connect(dialog.accept)
|
||||||
|
button_layout.addWidget(ok_button)
|
||||||
|
|
||||||
|
cancel_button = QPushButton("取消")
|
||||||
|
cancel_button.clicked.connect(dialog.reject)
|
||||||
|
button_layout.addWidget(cancel_button)
|
||||||
|
|
||||||
|
layout.addLayout(button_layout)
|
||||||
|
|
||||||
|
# 显示对话框
|
||||||
|
if dialog.exec() != QDialog.Accepted:
|
||||||
|
return
|
||||||
|
|
||||||
|
# 获取页码范围
|
||||||
|
page_range_text = page_range_input.text().strip()
|
||||||
|
if not page_range_text:
|
||||||
|
self.status_label.setText("页码范围不能为空")
|
||||||
|
return
|
||||||
|
|
||||||
|
# 解析页码范围
|
||||||
|
try:
|
||||||
|
start_page, end_page = map(int, page_range_text.split('-'))
|
||||||
|
if start_page < 1 or end_page < start_page:
|
||||||
|
self.status_label.setText("页码范围格式错误")
|
||||||
|
return
|
||||||
|
except:
|
||||||
|
self.status_label.setText("页码范围格式错误,正确格式为:2-6")
|
||||||
|
return
|
||||||
|
|
||||||
# 选择导出文件路径
|
# 选择导出文件路径
|
||||||
|
from PySide6.QtWidgets import QFileDialog
|
||||||
file_path, _ = QFileDialog.getSaveFileName(self, "导出域名", "", "Excel文件 (*.xlsx);;CSV文件 (*.csv)")
|
file_path, _ = QFileDialog.getSaveFileName(self, "导出域名", "", "Excel文件 (*.xlsx);;CSV文件 (*.csv)")
|
||||||
if not file_path:
|
if not file_path:
|
||||||
return
|
return
|
||||||
|
|
||||||
# 导出数据
|
if button_text == "只导出当前页":
|
||||||
try:
|
# 从当前表格中获取域名数据
|
||||||
export_manager = ExportManager()
|
domains = []
|
||||||
if file_path.endswith('.xlsx'):
|
for row in range(self.table_widget.rowCount()):
|
||||||
export_manager.export_to_excel(domains, file_path)
|
domain = {
|
||||||
elif file_path.endswith('.csv'):
|
'domain': self.table_widget.item(row, 0).text(),
|
||||||
export_manager.export_to_csv(domains, file_path)
|
'register_status': self.table_widget.item(row, 1).text(),
|
||||||
else:
|
'use_status': self.table_widget.item(row, 2).text(),
|
||||||
self.status_label.setText("不支持的文件格式")
|
'detect_status': self.table_widget.item(row, 3).text(),
|
||||||
|
'review_status': self.table_widget.item(row, 4).text(),
|
||||||
|
'expire_date': self.table_widget.item(row, 5).text(),
|
||||||
|
'company_type': self.table_widget.item(row, 6).text(),
|
||||||
|
'website_url': self.table_widget.item(row, 7).text(),
|
||||||
|
'detect_time': self.table_widget.item(row, 8).text(),
|
||||||
|
'has_beian': self.table_widget.item(row, 9).text(),
|
||||||
|
'beian_year': self.table_widget.item(row, 10).text(),
|
||||||
|
'snapshot_years': self.table_widget.item(row, 11).text(),
|
||||||
|
'baidu_history': self.table_widget.item(row, 12).text(),
|
||||||
|
'baidu_site': self.table_widget.item(row, 13).text(),
|
||||||
|
'is_chinese_title': self.table_widget.item(row, 14).text(),
|
||||||
|
'qihu360_site': self.table_widget.item(row, 15).text(),
|
||||||
|
'google_site': self.table_widget.item(row, 16).text(),
|
||||||
|
'backlink_count': self.table_widget.item(row, 17).text()
|
||||||
|
}
|
||||||
|
domains.append(domain)
|
||||||
|
|
||||||
|
if not domains:
|
||||||
|
self.status_label.setText("没有数据可导出")
|
||||||
return
|
return
|
||||||
|
|
||||||
self.status_label.setText(f"导出成功: {file_path}")
|
# 导出数据
|
||||||
logger.info(f"导出成功: {file_path}")
|
try:
|
||||||
except Exception as e:
|
from app.core.export_manager import ExportManager
|
||||||
self.status_label.setText(f"导出失败: {str(e)}")
|
export_manager = ExportManager()
|
||||||
logger.error(f"导出失败: {e}")
|
if file_path.endswith('.xlsx'):
|
||||||
|
export_manager.export_to_excel(domains, file_path)
|
||||||
|
elif file_path.endswith('.csv'):
|
||||||
|
export_manager.export_to_csv(domains, file_path)
|
||||||
|
else:
|
||||||
|
self.status_label.setText("不支持的文件格式")
|
||||||
|
return
|
||||||
|
|
||||||
|
self.status_label.setText(f"导出成功: {file_path}")
|
||||||
|
logger.info(f"导出成功: {file_path}")
|
||||||
|
except Exception as e:
|
||||||
|
self.status_label.setText(f"导出失败: {str(e)}")
|
||||||
|
logger.error(f"导出失败: {e}")
|
||||||
|
elif button_text == "导出指定页码范围":
|
||||||
|
# 获取筛选条件
|
||||||
|
register_status_text = self.register_status_combo.currentText()
|
||||||
|
use_status_text = self.use_status_combo.currentText()
|
||||||
|
detect_status_text = self.detect_status_combo.currentText()
|
||||||
|
review_status_text = self.review_status_combo.currentText()
|
||||||
|
beian_year = self.beian_year_input.text().strip()
|
||||||
|
snapshot_year = self.snapshot_year_input.text().strip()
|
||||||
|
backlink = self.backlink_checkbox.isChecked()
|
||||||
|
search_keyword = self.search_input.text().strip()
|
||||||
|
page_size = self.page_size_spinbox.value()
|
||||||
|
|
||||||
|
# 转换状态值
|
||||||
|
status_mappings = {
|
||||||
|
'register_status': {
|
||||||
|
'全部': None,
|
||||||
|
'待检测': 0,
|
||||||
|
'可注册': 2,
|
||||||
|
'已注册': 1,
|
||||||
|
'宽限期': 3,
|
||||||
|
'赎回期': 4,
|
||||||
|
'删除期': 5
|
||||||
|
},
|
||||||
|
'use_status': {
|
||||||
|
'全部': None,
|
||||||
|
'未使用': 0,
|
||||||
|
'已经使用': 1,
|
||||||
|
'已经卖出': 2,
|
||||||
|
'已经预定': 3
|
||||||
|
},
|
||||||
|
'detect_status': {
|
||||||
|
'全部': None,
|
||||||
|
'待检测': 0,
|
||||||
|
'检测完成': 1,
|
||||||
|
'检测中': 2,
|
||||||
|
'黑名单': 3,
|
||||||
|
'检测失败': 4
|
||||||
|
},
|
||||||
|
'review_status': {
|
||||||
|
'全部': None,
|
||||||
|
'无需复核': 0,
|
||||||
|
'待人工复核': 1,
|
||||||
|
'人工通过': 2,
|
||||||
|
'人工拒绝': 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# 获取首页网址
|
||||||
|
website_url = self.website_url_input.text().strip()
|
||||||
|
|
||||||
|
# 构建查询条件
|
||||||
|
conditions = {
|
||||||
|
'register_status': status_mappings['register_status'][register_status_text],
|
||||||
|
'use_status': status_mappings['use_status'][use_status_text],
|
||||||
|
'detect_status': status_mappings['detect_status'][detect_status_text],
|
||||||
|
'review_status': status_mappings['review_status'][review_status_text],
|
||||||
|
'beian_year': beian_year,
|
||||||
|
'snapshot_year': snapshot_year,
|
||||||
|
'backlink_gt_10': backlink if backlink else None,
|
||||||
|
'search_keyword': search_keyword,
|
||||||
|
'website_url': website_url if website_url else None
|
||||||
|
}
|
||||||
|
|
||||||
|
# 显示导出中状态
|
||||||
|
self.status_label.setText("正在导出,请稍候...")
|
||||||
|
|
||||||
|
# 创建并启动导出线程
|
||||||
|
self.export_thread = ExportRangeThread(conditions, start_page, end_page, page_size, file_path)
|
||||||
|
self.export_thread.finished.connect(self.on_export_finished)
|
||||||
|
self.export_thread.error.connect(self.on_export_error)
|
||||||
|
self.export_thread.start()
|
||||||
|
else:
|
||||||
|
# 导出所有页
|
||||||
|
# 获取筛选条件
|
||||||
|
register_status_text = self.register_status_combo.currentText()
|
||||||
|
use_status_text = self.use_status_combo.currentText()
|
||||||
|
detect_status_text = self.detect_status_combo.currentText()
|
||||||
|
review_status_text = self.review_status_combo.currentText()
|
||||||
|
beian_year = self.beian_year_input.text().strip()
|
||||||
|
snapshot_year = self.snapshot_year_input.text().strip()
|
||||||
|
backlink = self.backlink_checkbox.isChecked()
|
||||||
|
search_keyword = self.search_input.text().strip()
|
||||||
|
|
||||||
|
# 转换状态值
|
||||||
|
status_mappings = {
|
||||||
|
'register_status': {
|
||||||
|
'全部': None,
|
||||||
|
'待检测': 0,
|
||||||
|
'可注册': 2,
|
||||||
|
'已注册': 1,
|
||||||
|
'宽限期': 3,
|
||||||
|
'赎回期': 4,
|
||||||
|
'删除期': 5
|
||||||
|
},
|
||||||
|
'use_status': {
|
||||||
|
'全部': None,
|
||||||
|
'未使用': 0,
|
||||||
|
'已经使用': 1,
|
||||||
|
'已经卖出': 2,
|
||||||
|
'已经预定': 3
|
||||||
|
},
|
||||||
|
'detect_status': {
|
||||||
|
'全部': None,
|
||||||
|
'待检测': 0,
|
||||||
|
'检测完成': 1,
|
||||||
|
'检测中': 2,
|
||||||
|
'黑名单': 3,
|
||||||
|
'检测失败': 4
|
||||||
|
},
|
||||||
|
'review_status': {
|
||||||
|
'全部': None,
|
||||||
|
'无需复核': 0,
|
||||||
|
'待人工复核': 1,
|
||||||
|
'人工通过': 2,
|
||||||
|
'人工拒绝': 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# 获取首页网址
|
||||||
|
website_url = self.website_url_input.text().strip()
|
||||||
|
|
||||||
|
# 构建查询条件
|
||||||
|
conditions = {
|
||||||
|
'register_status': status_mappings['register_status'][register_status_text],
|
||||||
|
'use_status': status_mappings['use_status'][use_status_text],
|
||||||
|
'detect_status': status_mappings['detect_status'][detect_status_text],
|
||||||
|
'review_status': status_mappings['review_status'][review_status_text],
|
||||||
|
'beian_year': beian_year,
|
||||||
|
'snapshot_year': snapshot_year,
|
||||||
|
'backlink_gt_10': backlink if backlink else None,
|
||||||
|
'search_keyword': search_keyword,
|
||||||
|
'website_url': website_url if website_url else None
|
||||||
|
}
|
||||||
|
|
||||||
|
# 显示导出中状态
|
||||||
|
self.status_label.setText("正在导出,请稍候...")
|
||||||
|
|
||||||
|
# 创建并启动导出线程
|
||||||
|
self.export_thread = ExportThread(conditions, file_path)
|
||||||
|
self.export_thread.finished.connect(self.on_export_finished)
|
||||||
|
self.export_thread.error.connect(self.on_export_error)
|
||||||
|
self.export_thread.start()
|
||||||
|
|
||||||
|
def on_export_finished(self, file_path):
|
||||||
|
"""
|
||||||
|
导出完成回调
|
||||||
|
"""
|
||||||
|
self.status_label.setText(f"导出成功: {file_path}")
|
||||||
|
logger.info(f"导出成功: {file_path}")
|
||||||
|
|
||||||
|
def on_export_error(self, error):
|
||||||
|
"""
|
||||||
|
导出错误回调
|
||||||
|
"""
|
||||||
|
self.status_label.setText(f"导出失败: {error}")
|
||||||
|
logger.error(f"导出失败: {error}")
|
||||||
|
|
||||||
def update_status(self):
|
def update_status(self):
|
||||||
"""
|
"""
|
||||||
@@ -1332,4 +1607,251 @@ class DomainFilterWidget(QWidget):
|
|||||||
# 显示更新结果
|
# 显示更新结果
|
||||||
self.status_label.setText(f"成功更新 {updated_count} 个域名的信息")
|
self.status_label.setText(f"成功更新 {updated_count} 个域名的信息")
|
||||||
logger.info(f"成功更新 {updated_count} 个域名的信息")
|
logger.info(f"成功更新 {updated_count} 个域名的信息")
|
||||||
logger.info(f"更新数据: {update_data}")
|
logger.info(f"更新数据: {update_data}")
|
||||||
|
|
||||||
|
class ExportThread(QThread):
|
||||||
|
"""
|
||||||
|
导出线程
|
||||||
|
"""
|
||||||
|
finished = Signal(str)
|
||||||
|
error = Signal(str)
|
||||||
|
|
||||||
|
def __init__(self, conditions, file_path):
|
||||||
|
super().__init__()
|
||||||
|
self.conditions = conditions
|
||||||
|
self.file_path = file_path
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
try:
|
||||||
|
from app.core.export_manager import ExportManager
|
||||||
|
|
||||||
|
# 分批获取和导出域名
|
||||||
|
db = Database()
|
||||||
|
export_manager = ExportManager()
|
||||||
|
|
||||||
|
# 先获取符合条件的域名总数
|
||||||
|
total_count = db.get_domains_count(self.conditions)
|
||||||
|
if total_count == 0:
|
||||||
|
self.error.emit("没有数据可导出")
|
||||||
|
return
|
||||||
|
|
||||||
|
# 分批处理,每批1000个
|
||||||
|
batch_size = 1000
|
||||||
|
current_page = 1
|
||||||
|
all_domains = []
|
||||||
|
|
||||||
|
while True:
|
||||||
|
# 获取当前批次的域名
|
||||||
|
domains = db.get_domains_with_details(self.conditions, page=current_page, page_size=batch_size)
|
||||||
|
if not domains:
|
||||||
|
break
|
||||||
|
|
||||||
|
# 转换域名数据格式
|
||||||
|
for domain in domains:
|
||||||
|
# 注册状态映射
|
||||||
|
register_status_mapping = {
|
||||||
|
0: '待检测',
|
||||||
|
1: '已注册',
|
||||||
|
2: '可注册',
|
||||||
|
3: '宽限期',
|
||||||
|
4: '赎回期',
|
||||||
|
5: '删除期'
|
||||||
|
}
|
||||||
|
|
||||||
|
# 使用状态映射
|
||||||
|
use_status_mapping = {
|
||||||
|
0: '未使用',
|
||||||
|
1: '已经使用',
|
||||||
|
2: '已经卖出',
|
||||||
|
3: '已经预定'
|
||||||
|
}
|
||||||
|
|
||||||
|
# 检测状态映射
|
||||||
|
detect_status_mapping = {
|
||||||
|
0: '待检测',
|
||||||
|
1: '检测完成',
|
||||||
|
2: '检测中',
|
||||||
|
3: '黑名单',
|
||||||
|
4: '检测失败'
|
||||||
|
}
|
||||||
|
|
||||||
|
# 人工复核状态映射
|
||||||
|
review_status_mapping = {
|
||||||
|
0: '无需复核',
|
||||||
|
1: '待人工复核',
|
||||||
|
2: '人工通过',
|
||||||
|
3: '人工拒绝'
|
||||||
|
}
|
||||||
|
|
||||||
|
# 备案状态映射
|
||||||
|
has_beian_mapping = {
|
||||||
|
0: '待检测',
|
||||||
|
1: '有备案记录',
|
||||||
|
2: '没有备案记录'
|
||||||
|
}
|
||||||
|
|
||||||
|
# 单位性质映射
|
||||||
|
company_type_mapping = {
|
||||||
|
0: '个人',
|
||||||
|
1: '企业',
|
||||||
|
2: '其他'
|
||||||
|
}
|
||||||
|
|
||||||
|
# 构建导出数据
|
||||||
|
export_domain = {
|
||||||
|
'domain': domain.get('domain', ''),
|
||||||
|
'register_status': register_status_mapping.get(domain.get('register_status'), '未知'),
|
||||||
|
'use_status': use_status_mapping.get(domain.get('use_status'), '未知'),
|
||||||
|
'detect_status': detect_status_mapping.get(domain.get('detect_status'), '未知'),
|
||||||
|
'review_status': review_status_mapping.get(domain.get('review_status'), '未知'),
|
||||||
|
'expire_date': domain.get('expire_date', ''),
|
||||||
|
'company_type': company_type_mapping.get(domain.get('company_type'), '未知'),
|
||||||
|
'website_url': domain.get('website_url', ''),
|
||||||
|
'detect_time': domain.get('detect_time', ''),
|
||||||
|
'has_beian': has_beian_mapping.get(domain.get('has_beian'), '未知'),
|
||||||
|
'beian_year': domain.get('beian_year', ''),
|
||||||
|
'snapshot_years': domain.get('snapshot_years', ''),
|
||||||
|
'baidu_history': '是' if domain.get('baidu_history') else '否',
|
||||||
|
'baidu_site': '是' if domain.get('baidu_site') else '否',
|
||||||
|
'is_chinese_title': '是' if domain.get('is_chinese_title') else '否',
|
||||||
|
'qihu360_site': '是' if domain.get('qihu360_site') else '否',
|
||||||
|
'google_site': '是' if domain.get('google_site') else '否',
|
||||||
|
'backlink_count': '>10' if domain.get('backlink_count_gt_10') else '<=10'
|
||||||
|
}
|
||||||
|
all_domains.append(export_domain)
|
||||||
|
|
||||||
|
# 处理下一批
|
||||||
|
current_page += 1
|
||||||
|
|
||||||
|
# 导出数据
|
||||||
|
if self.file_path.endswith('.xlsx'):
|
||||||
|
export_manager.export_to_excel(all_domains, self.file_path)
|
||||||
|
elif self.file_path.endswith('.csv'):
|
||||||
|
export_manager.export_to_csv(all_domains, self.file_path)
|
||||||
|
else:
|
||||||
|
self.error.emit("不支持的文件格式")
|
||||||
|
return
|
||||||
|
|
||||||
|
self.finished.emit(self.file_path)
|
||||||
|
except Exception as e:
|
||||||
|
self.error.emit(str(e))
|
||||||
|
|
||||||
|
class ExportRangeThread(QThread):
|
||||||
|
"""
|
||||||
|
导出指定页码范围线程
|
||||||
|
"""
|
||||||
|
finished = Signal(str)
|
||||||
|
error = Signal(str)
|
||||||
|
|
||||||
|
def __init__(self, conditions, start_page, end_page, page_size, file_path):
|
||||||
|
super().__init__()
|
||||||
|
self.conditions = conditions
|
||||||
|
self.start_page = start_page
|
||||||
|
self.end_page = end_page
|
||||||
|
self.page_size = page_size
|
||||||
|
self.file_path = file_path
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
try:
|
||||||
|
from app.core.export_manager import ExportManager
|
||||||
|
|
||||||
|
# 获取指定页码范围的域名
|
||||||
|
db = Database()
|
||||||
|
export_domains = []
|
||||||
|
|
||||||
|
# 遍历指定的页码范围
|
||||||
|
for page in range(self.start_page, self.end_page + 1):
|
||||||
|
# 获取当前页的数据
|
||||||
|
domains = db.get_domains_with_details(self.conditions, page=page, page_size=self.page_size)
|
||||||
|
|
||||||
|
# 转换域名数据格式并添加到导出列表
|
||||||
|
for domain in domains:
|
||||||
|
# 注册状态映射
|
||||||
|
register_status_mapping = {
|
||||||
|
0: '待检测',
|
||||||
|
1: '已注册',
|
||||||
|
2: '可注册',
|
||||||
|
3: '宽限期',
|
||||||
|
4: '赎回期',
|
||||||
|
5: '删除期'
|
||||||
|
}
|
||||||
|
|
||||||
|
# 使用状态映射
|
||||||
|
use_status_mapping = {
|
||||||
|
0: '未使用',
|
||||||
|
1: '已经使用',
|
||||||
|
2: '已经卖出',
|
||||||
|
3: '已经预定'
|
||||||
|
}
|
||||||
|
|
||||||
|
# 检测状态映射
|
||||||
|
detect_status_mapping = {
|
||||||
|
0: '待检测',
|
||||||
|
1: '检测完成',
|
||||||
|
2: '检测中',
|
||||||
|
3: '黑名单',
|
||||||
|
4: '检测失败'
|
||||||
|
}
|
||||||
|
|
||||||
|
# 人工复核状态映射
|
||||||
|
review_status_mapping = {
|
||||||
|
0: '无需复核',
|
||||||
|
1: '待人工复核',
|
||||||
|
2: '人工通过',
|
||||||
|
3: '人工拒绝'
|
||||||
|
}
|
||||||
|
|
||||||
|
# 备案状态映射
|
||||||
|
has_beian_mapping = {
|
||||||
|
0: '待检测',
|
||||||
|
1: '有备案记录',
|
||||||
|
2: '没有备案记录'
|
||||||
|
}
|
||||||
|
|
||||||
|
# 单位性质映射
|
||||||
|
company_type_mapping = {
|
||||||
|
0: '个人',
|
||||||
|
1: '企业',
|
||||||
|
2: '其他'
|
||||||
|
}
|
||||||
|
|
||||||
|
# 构建导出数据
|
||||||
|
export_domain = {
|
||||||
|
'domain': domain.get('domain', ''),
|
||||||
|
'register_status': register_status_mapping.get(domain.get('register_status'), '未知'),
|
||||||
|
'use_status': use_status_mapping.get(domain.get('use_status'), '未知'),
|
||||||
|
'detect_status': detect_status_mapping.get(domain.get('detect_status'), '未知'),
|
||||||
|
'review_status': review_status_mapping.get(domain.get('review_status'), '未知'),
|
||||||
|
'expire_date': domain.get('expire_date', ''),
|
||||||
|
'company_type': company_type_mapping.get(domain.get('company_type'), '未知'),
|
||||||
|
'website_url': domain.get('website_url', ''),
|
||||||
|
'detect_time': domain.get('detect_time', ''),
|
||||||
|
'has_beian': has_beian_mapping.get(domain.get('has_beian'), '未知'),
|
||||||
|
'beian_year': domain.get('beian_year', ''),
|
||||||
|
'snapshot_years': domain.get('snapshot_years', ''),
|
||||||
|
'baidu_history': '是' if domain.get('baidu_history') else '否',
|
||||||
|
'baidu_site': '是' if domain.get('baidu_site') else '否',
|
||||||
|
'is_chinese_title': '是' if domain.get('is_chinese_title') else '否',
|
||||||
|
'qihu360_site': '是' if domain.get('qihu360_site') else '否',
|
||||||
|
'google_site': '是' if domain.get('google_site') else '否',
|
||||||
|
'backlink_count': '>10' if domain.get('backlink_count_gt_10') else '<=10'
|
||||||
|
}
|
||||||
|
export_domains.append(export_domain)
|
||||||
|
|
||||||
|
if not export_domains:
|
||||||
|
self.error.emit("没有数据可导出")
|
||||||
|
return
|
||||||
|
|
||||||
|
# 导出数据
|
||||||
|
export_manager = ExportManager()
|
||||||
|
if self.file_path.endswith('.xlsx'):
|
||||||
|
export_manager.export_to_excel(export_domains, self.file_path)
|
||||||
|
elif self.file_path.endswith('.csv'):
|
||||||
|
export_manager.export_to_csv(export_domains, self.file_path)
|
||||||
|
else:
|
||||||
|
self.error.emit("不支持的文件格式")
|
||||||
|
return
|
||||||
|
|
||||||
|
self.finished.emit(self.file_path)
|
||||||
|
except Exception as e:
|
||||||
|
self.error.emit(str(e))
|
||||||
@@ -246,6 +246,216 @@ class ImportFileThread(QThread):
|
|||||||
self.finished.emit(False, f"导入失败: {str(e)}")
|
self.finished.emit(False, f"导入失败: {str(e)}")
|
||||||
|
|
||||||
|
|
||||||
|
class ImportMultiFileThread(QThread):
|
||||||
|
"""
|
||||||
|
多文件导入线程,用于处理多个文件的导入
|
||||||
|
"""
|
||||||
|
progress_updated = Signal(int)
|
||||||
|
finished = Signal(bool, str)
|
||||||
|
|
||||||
|
def __init__(self, file_paths, source_type):
|
||||||
|
"""
|
||||||
|
初始化多文件导入线程
|
||||||
|
|
||||||
|
:param file_paths: 文件路径列表
|
||||||
|
:param source_type: 来源类型
|
||||||
|
"""
|
||||||
|
super().__init__()
|
||||||
|
self.file_paths = file_paths
|
||||||
|
self.source_type = source_type
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
"""
|
||||||
|
运行多文件导入线程
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
collector = DomainCollector()
|
||||||
|
|
||||||
|
# 首先计算所有文件中的域名总数
|
||||||
|
total = 0
|
||||||
|
encodings = ['utf-8', 'utf-8-sig', 'gbk', 'gb2312', 'cp936', 'latin-1', 'ascii']
|
||||||
|
|
||||||
|
# 计算所有文件的总域名数
|
||||||
|
for file_path in self.file_paths:
|
||||||
|
file_total = 0
|
||||||
|
# 尝试不同的编码格式计算域名数量
|
||||||
|
for enc in encodings:
|
||||||
|
try:
|
||||||
|
with open(file_path, 'r', encoding=enc) as f:
|
||||||
|
file_total = sum(1 for line in f if line.strip())
|
||||||
|
break
|
||||||
|
except UnicodeDecodeError:
|
||||||
|
continue
|
||||||
|
|
||||||
|
if file_total == 0:
|
||||||
|
# 尝试使用二进制模式读取
|
||||||
|
try:
|
||||||
|
import chardet
|
||||||
|
with open(file_path, 'rb') as f:
|
||||||
|
raw_data = f.read()
|
||||||
|
result = chardet.detect(raw_data)
|
||||||
|
encoding = result['encoding']
|
||||||
|
if encoding:
|
||||||
|
content = raw_data.decode(encoding)
|
||||||
|
file_total = sum(1 for line in content.split('\n') if line.strip())
|
||||||
|
else:
|
||||||
|
# 最后尝试使用 replace 模式读取
|
||||||
|
with open(file_path, 'r', encoding='utf-8', errors='replace') as f:
|
||||||
|
file_total = sum(1 for line in f if line.strip())
|
||||||
|
except Exception:
|
||||||
|
with open(file_path, 'r', encoding='utf-8', errors='replace') as f:
|
||||||
|
file_total = sum(1 for line in f if line.strip())
|
||||||
|
|
||||||
|
total += file_total
|
||||||
|
|
||||||
|
# 实时更新进度:开始
|
||||||
|
self.progress_updated.emit(0)
|
||||||
|
|
||||||
|
# 读取并处理所有文件的域名
|
||||||
|
normalized_domains = []
|
||||||
|
processed = 0
|
||||||
|
|
||||||
|
# 处理每个文件
|
||||||
|
for file_path in self.file_paths:
|
||||||
|
# 尝试不同的编码读取文件
|
||||||
|
for enc in encodings:
|
||||||
|
try:
|
||||||
|
with open(file_path, 'r', encoding=enc) as f:
|
||||||
|
for line in f:
|
||||||
|
domain = line.strip()
|
||||||
|
if domain:
|
||||||
|
from app.utils.domain_utils import normalize_domain
|
||||||
|
import tldextract
|
||||||
|
normalized = normalize_domain(domain)
|
||||||
|
if normalized:
|
||||||
|
# 提取顶级域名
|
||||||
|
ext = tldextract.extract(normalized)
|
||||||
|
tld = ext.suffix
|
||||||
|
normalized_domains.append((normalized, tld))
|
||||||
|
|
||||||
|
processed += 1
|
||||||
|
# 更新进度(占30%)
|
||||||
|
progress = int(processed / total * 30)
|
||||||
|
self.progress_updated.emit(progress)
|
||||||
|
break
|
||||||
|
except UnicodeDecodeError:
|
||||||
|
continue
|
||||||
|
|
||||||
|
# 如果仍然失败,尝试使用二进制模式读取
|
||||||
|
if processed == 0 or (processed > 0 and not normalized_domains):
|
||||||
|
try:
|
||||||
|
import chardet
|
||||||
|
with open(file_path, 'rb') as f:
|
||||||
|
raw_data = f.read()
|
||||||
|
result = chardet.detect(raw_data)
|
||||||
|
encoding = result['encoding']
|
||||||
|
if encoding:
|
||||||
|
content = raw_data.decode(encoding)
|
||||||
|
lines = content.split('\n')
|
||||||
|
for line in lines:
|
||||||
|
domain = line.strip()
|
||||||
|
if domain:
|
||||||
|
from app.utils.domain_utils import normalize_domain
|
||||||
|
import tldextract
|
||||||
|
normalized = normalize_domain(domain)
|
||||||
|
if normalized:
|
||||||
|
# 提取顶级域名
|
||||||
|
ext = tldextract.extract(normalized)
|
||||||
|
tld = ext.suffix
|
||||||
|
normalized_domains.append((normalized, tld))
|
||||||
|
|
||||||
|
processed += 1
|
||||||
|
# 更新进度(占30%)
|
||||||
|
progress = int(processed / total * 30)
|
||||||
|
self.progress_updated.emit(progress)
|
||||||
|
else:
|
||||||
|
# 最后尝试使用 replace 模式读取
|
||||||
|
with open(file_path, 'r', encoding='utf-8', errors='replace') as f:
|
||||||
|
for line in f:
|
||||||
|
domain = line.strip()
|
||||||
|
if domain:
|
||||||
|
from app.utils.domain_utils import normalize_domain
|
||||||
|
import tldextract
|
||||||
|
normalized = normalize_domain(domain)
|
||||||
|
if normalized:
|
||||||
|
# 提取顶级域名
|
||||||
|
ext = tldextract.extract(normalized)
|
||||||
|
tld = ext.suffix
|
||||||
|
normalized_domains.append((normalized, tld))
|
||||||
|
|
||||||
|
processed += 1
|
||||||
|
# 更新进度(占30%)
|
||||||
|
progress = int(processed / total * 30)
|
||||||
|
self.progress_updated.emit(progress)
|
||||||
|
except Exception:
|
||||||
|
with open(file_path, 'r', encoding='utf-8', errors='replace') as f:
|
||||||
|
for line in f:
|
||||||
|
domain = line.strip()
|
||||||
|
if domain:
|
||||||
|
from app.utils.domain_utils import normalize_domain
|
||||||
|
import tldextract
|
||||||
|
normalized = normalize_domain(domain)
|
||||||
|
if normalized:
|
||||||
|
# 提取顶级域名
|
||||||
|
ext = tldextract.extract(normalized)
|
||||||
|
tld = ext.suffix
|
||||||
|
normalized_domains.append((normalized, tld))
|
||||||
|
|
||||||
|
processed += 1
|
||||||
|
# 更新进度(占30%)
|
||||||
|
progress = int(processed / total * 30)
|
||||||
|
self.progress_updated.emit(progress)
|
||||||
|
|
||||||
|
# 批量检查域名是否存在
|
||||||
|
batch_data = []
|
||||||
|
existing_domains = []
|
||||||
|
if normalized_domains:
|
||||||
|
all_domains = [domain for domain, tld in normalized_domains]
|
||||||
|
existing_domains = collector.db.check_domains_exist(all_domains)
|
||||||
|
existing_set = set(existing_domains)
|
||||||
|
|
||||||
|
# 准备批量添加数据
|
||||||
|
for domain, tld in normalized_domains:
|
||||||
|
if domain not in existing_set:
|
||||||
|
batch_data.append((domain, tld, self.source_type))
|
||||||
|
|
||||||
|
# 分批次添加域名(占70%进度)
|
||||||
|
batch_size = 1000
|
||||||
|
total_batches = len(batch_data)
|
||||||
|
for i in range(0, len(batch_data), batch_size):
|
||||||
|
batch = batch_data[i:i+batch_size]
|
||||||
|
collector.db.add_domains_batch(batch)
|
||||||
|
|
||||||
|
# 更新进度
|
||||||
|
processed_batches = min(i + len(batch), total_batches)
|
||||||
|
progress = 30 + int(processed_batches / total_batches * 70)
|
||||||
|
self.progress_updated.emit(progress)
|
||||||
|
|
||||||
|
# 完成导入
|
||||||
|
self.progress_updated.emit(100)
|
||||||
|
|
||||||
|
# 计算统计信息
|
||||||
|
stats = {
|
||||||
|
'total': total,
|
||||||
|
'valid': len(normalized_domains),
|
||||||
|
'added': len(batch_data),
|
||||||
|
'exists': len(existing_domains),
|
||||||
|
'invalid': total - len(normalized_domains),
|
||||||
|
'failed': 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# 根据统计信息生成消息
|
||||||
|
if stats['added'] > 0:
|
||||||
|
message = f"导入完成: 总域名数 {stats['total']}, 有效域名数 {stats['valid']}, 新增域名数 {stats['added']}, 已存在域名数 {stats['exists']}, 无效域名数 {stats['invalid']}"
|
||||||
|
else:
|
||||||
|
message = f"导入完成: 所有域名已存在,未添加新域名"
|
||||||
|
|
||||||
|
self.finished.emit(True, message)
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f"导入失败: {e}")
|
||||||
|
self.finished.emit(False, f"导入失败: {str(e)}")
|
||||||
|
|
||||||
|
|
||||||
class DomainImportWidget(QWidget):
|
class DomainImportWidget(QWidget):
|
||||||
"""
|
"""
|
||||||
域名导入界面
|
域名导入界面
|
||||||
@@ -355,60 +565,33 @@ class DomainImportWidget(QWidget):
|
|||||||
"""
|
"""
|
||||||
导入文件
|
导入文件
|
||||||
"""
|
"""
|
||||||
file_path, _ = QFileDialog.getOpenFileName(self, "选择文件", "", "文本文件 (*.txt)")
|
file_paths, _ = QFileDialog.getOpenFileNames(self, "选择文件", "", "文本文件 (*.txt)")
|
||||||
if file_path:
|
if file_paths:
|
||||||
try:
|
try:
|
||||||
# 尝试不同的编码格式
|
# 尝试不同的编码格式
|
||||||
encodings = ['utf-8', 'utf-8-sig', 'gbk', 'gb2312', 'cp936', 'latin-1', 'ascii']
|
encodings = ['utf-8', 'utf-8-sig', 'gbk', 'gb2312', 'cp936', 'latin-1', 'ascii']
|
||||||
domain_count = 0
|
total_domain_count = 0
|
||||||
|
all_domains = []
|
||||||
|
|
||||||
# 尝试使用不同编码读取并计数
|
# 处理每个选择的文件
|
||||||
for encoding in encodings:
|
for file_path in file_paths:
|
||||||
try:
|
domain_count = 0
|
||||||
with open(file_path, 'r', encoding=encoding) as f:
|
file_domains = []
|
||||||
domain_count = sum(1 for line in f if line.strip())
|
|
||||||
logger.info(f"使用编码 {encoding} 成功读取文件")
|
# 尝试使用不同编码读取并计数
|
||||||
break
|
|
||||||
except UnicodeDecodeError:
|
|
||||||
continue
|
|
||||||
|
|
||||||
# 如果仍然失败,尝试使用二进制模式读取并猜测编码
|
|
||||||
if domain_count == 0:
|
|
||||||
try:
|
|
||||||
import chardet
|
|
||||||
with open(file_path, 'rb') as f:
|
|
||||||
raw_data = f.read()
|
|
||||||
result = chardet.detect(raw_data)
|
|
||||||
encoding = result['encoding']
|
|
||||||
if encoding:
|
|
||||||
domain_count = sum(1 for line in raw_data.decode(encoding).split('\n') if line.strip())
|
|
||||||
logger.info(f"使用 chardet 检测到编码 {encoding} 并成功读取文件")
|
|
||||||
else:
|
|
||||||
raise Exception("无法识别文件编码")
|
|
||||||
except Exception as e:
|
|
||||||
logger.warning(f"chardet 检测失败: {e}")
|
|
||||||
# 最后尝试使用 replace 模式读取
|
|
||||||
with open(file_path, 'r', encoding='utf-8', errors='replace') as f:
|
|
||||||
domain_count = sum(1 for line in f if line.strip())
|
|
||||||
logger.info("使用 utf-8 replace 模式读取文件")
|
|
||||||
|
|
||||||
# 对于大文件,不显示所有域名,只显示文件路径和域名数量
|
|
||||||
if domain_count > 1000:
|
|
||||||
self.text_edit.setText(f"文件路径: {file_path}\n域名数量: {domain_count}\n\n提示: 由于文件较大,仅显示文件信息,不显示具体域名。")
|
|
||||||
# 保存文件路径,用于后续导入
|
|
||||||
self.imported_file_path = file_path
|
|
||||||
else:
|
|
||||||
# 对于小文件,显示所有域名
|
|
||||||
domains = []
|
|
||||||
for encoding in encodings:
|
for encoding in encodings:
|
||||||
try:
|
try:
|
||||||
with open(file_path, 'r', encoding=encoding) as f:
|
with open(file_path, 'r', encoding=encoding) as f:
|
||||||
domains = f.readlines()
|
lines = f.readlines()
|
||||||
|
domain_count = sum(1 for line in lines if line.strip())
|
||||||
|
file_domains = [line.strip() for line in lines if line.strip()]
|
||||||
|
logger.info(f"使用编码 {encoding} 成功读取文件: {file_path}")
|
||||||
break
|
break
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
continue
|
continue
|
||||||
if not domains:
|
|
||||||
# 尝试使用二进制模式读取
|
# 如果仍然失败,尝试使用二进制模式读取并猜测编码
|
||||||
|
if domain_count == 0:
|
||||||
try:
|
try:
|
||||||
import chardet
|
import chardet
|
||||||
with open(file_path, 'rb') as f:
|
with open(file_path, 'rb') as f:
|
||||||
@@ -416,20 +599,42 @@ class DomainImportWidget(QWidget):
|
|||||||
result = chardet.detect(raw_data)
|
result = chardet.detect(raw_data)
|
||||||
encoding = result['encoding']
|
encoding = result['encoding']
|
||||||
if encoding:
|
if encoding:
|
||||||
domains = raw_data.decode(encoding).split('\n')
|
content = raw_data.decode(encoding)
|
||||||
|
lines = content.split('\n')
|
||||||
|
domain_count = sum(1 for line in lines if line.strip())
|
||||||
|
file_domains = [line.strip() for line in lines if line.strip()]
|
||||||
|
logger.info(f"使用 chardet 检测到编码 {encoding} 并成功读取文件: {file_path}")
|
||||||
else:
|
else:
|
||||||
with open(file_path, 'r', encoding='utf-8', errors='replace') as f:
|
raise Exception("无法识别文件编码")
|
||||||
domains = f.readlines()
|
except Exception as e:
|
||||||
except Exception:
|
logger.warning(f"chardet 检测失败: {e}")
|
||||||
|
# 最后尝试使用 replace 模式读取
|
||||||
with open(file_path, 'r', encoding='utf-8', errors='replace') as f:
|
with open(file_path, 'r', encoding='utf-8', errors='replace') as f:
|
||||||
domains = f.readlines()
|
lines = f.readlines()
|
||||||
domains = [domain.strip() for domain in domains if domain.strip()]
|
domain_count = sum(1 for line in lines if line.strip())
|
||||||
self.text_edit.setText('\n'.join(domains))
|
file_domains = [line.strip() for line in lines if line.strip()]
|
||||||
|
logger.info(f"使用 utf-8 replace 模式读取文件: {file_path}")
|
||||||
|
|
||||||
|
total_domain_count += domain_count
|
||||||
|
all_domains.extend(file_domains)
|
||||||
|
|
||||||
|
# 检查总域名数量
|
||||||
|
if total_domain_count > 1000:
|
||||||
|
# 对于大文件,不显示所有域名,只显示文件路径和域名数量
|
||||||
|
file_info = "\n".join([f"- {file_path}" for file_path in file_paths])
|
||||||
|
self.text_edit.setText(f"文件路径:\n{file_info}\n\n总域名数量: {total_domain_count}\n\n提示: 由于文件较大,仅显示文件信息,不显示具体域名。")
|
||||||
|
# 保存文件路径列表,用于后续导入
|
||||||
|
self.imported_file_paths = file_paths
|
||||||
|
self.imported_file_path = None # 清除单个文件路径
|
||||||
|
else:
|
||||||
|
# 对于小文件,显示所有域名
|
||||||
|
self.text_edit.setText('\n'.join(all_domains))
|
||||||
# 清除文件路径,使用文本框中的域名
|
# 清除文件路径,使用文本框中的域名
|
||||||
|
self.imported_file_paths = None
|
||||||
self.imported_file_path = None
|
self.imported_file_path = None
|
||||||
|
|
||||||
self.status_label.setText(f"成功读取 {domain_count} 个域名")
|
self.status_label.setText(f"成功读取 {len(file_paths)} 个文件,共 {total_domain_count} 个域名")
|
||||||
logger.info(f"成功读取文件: {file_path}, 共 {domain_count} 个域名")
|
logger.info(f"成功读取 {len(file_paths)} 个文件,共 {total_domain_count} 个域名")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.status_label.setText(f"读取文件失败: {str(e)}")
|
self.status_label.setText(f"读取文件失败: {str(e)}")
|
||||||
logger.error(f"读取文件失败: {e}")
|
logger.error(f"读取文件失败: {e}")
|
||||||
@@ -438,8 +643,29 @@ class DomainImportWidget(QWidget):
|
|||||||
"""
|
"""
|
||||||
开始导入
|
开始导入
|
||||||
"""
|
"""
|
||||||
# 检查是否有导入的文件路径
|
# 检查是否有导入的文件路径列表(多个文件)
|
||||||
if hasattr(self, 'imported_file_path') and self.imported_file_path:
|
if hasattr(self, 'imported_file_paths') and self.imported_file_paths:
|
||||||
|
# 多文件导入,使用文件路径列表
|
||||||
|
file_paths = self.imported_file_paths
|
||||||
|
|
||||||
|
# 显示进度条
|
||||||
|
self.progress_bar.setVisible(True)
|
||||||
|
self.progress_bar.setValue(0)
|
||||||
|
self.status_label.setText("正在导入...")
|
||||||
|
|
||||||
|
# 禁用按钮
|
||||||
|
self.import_file_btn.setEnabled(False)
|
||||||
|
self.start_import_btn.setEnabled(False)
|
||||||
|
|
||||||
|
# 创建并启动多文件导入线程
|
||||||
|
self.import_thread = ImportMultiFileThread(file_paths, 7) # 7 表示 TXT 导入
|
||||||
|
self.import_thread.progress_updated.connect(self.update_progress)
|
||||||
|
self.import_thread.finished.connect(self.import_finished)
|
||||||
|
self.import_thread.start()
|
||||||
|
|
||||||
|
logger.info(f"开始从 {len(file_paths)} 个文件导入")
|
||||||
|
# 检查是否有导入的单个文件路径
|
||||||
|
elif hasattr(self, 'imported_file_path') and self.imported_file_path:
|
||||||
# 大文件导入,使用文件路径
|
# 大文件导入,使用文件路径
|
||||||
file_path = self.imported_file_path
|
file_path = self.imported_file_path
|
||||||
|
|
||||||
|
|||||||
@@ -279,11 +279,7 @@ class JumingCrawlerWidget(QWidget):
|
|||||||
self.date_edit.setDate(QDate.currentDate())
|
self.date_edit.setDate(QDate.currentDate())
|
||||||
self.date_edit.setCalendarPopup(True)
|
self.date_edit.setCalendarPopup(True)
|
||||||
self.date_edit.setStyleSheet("font-size: 14px; padding: 5px; border: 1px solid #ddd; border-radius: 4px; width: 150px;")
|
self.date_edit.setStyleSheet("font-size: 14px; padding: 5px; border: 1px solid #ddd; border-radius: 4px; width: 150px;")
|
||||||
# 设置最大日期为今天+4天,最小日期为今天的前4天
|
# 移除日期选择限制,允许选择任意时间
|
||||||
max_date = QDate.currentDate().addDays(4)
|
|
||||||
min_date = QDate.currentDate().addDays(-4)
|
|
||||||
self.date_edit.setMinimumDate(min_date)
|
|
||||||
self.date_edit.setMaximumDate(max_date)
|
|
||||||
date_layout.addWidget(date_label)
|
date_layout.addWidget(date_label)
|
||||||
date_layout.addWidget(self.date_edit)
|
date_layout.addWidget(self.date_edit)
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -791,13 +791,135 @@ class Database:
|
|||||||
sql = "UPDATE domains SET expire_date = %s WHERE id = %s"
|
sql = "UPDATE domains SET expire_date = %s WHERE id = %s"
|
||||||
return self.execute(sql, (expire_date, domain_id))
|
return self.execute(sql, (expire_date, domain_id))
|
||||||
|
|
||||||
def get_domains_to_detect(self, limit=1000):
|
def update_domain_detect_time(self, domain_id, detect_time):
|
||||||
|
"""
|
||||||
|
更新域名检测时间
|
||||||
|
|
||||||
|
:param domain_id: 域名ID
|
||||||
|
:param detect_time: 检测时间
|
||||||
|
:return: bool - 是否更新成功
|
||||||
|
"""
|
||||||
|
sql = "UPDATE domains SET detect_time = %s WHERE id = %s"
|
||||||
|
return self.execute(sql, (detect_time, domain_id))
|
||||||
|
|
||||||
|
def update_detection_status(self, domain_id, status_type, status):
|
||||||
|
"""
|
||||||
|
更新检测状态
|
||||||
|
|
||||||
|
:param domain_id: 域名ID
|
||||||
|
:param status_type: 状态类型 (whois, beian, intercept, juziseo_history, juziseo_outlink)
|
||||||
|
:param status: 状态值 (0: 待检测, 1: 已检测)
|
||||||
|
:return: bool - 是否更新成功
|
||||||
|
"""
|
||||||
|
status_field_map = {
|
||||||
|
'whois': 'whois_status',
|
||||||
|
'beian': 'beian_status',
|
||||||
|
'intercept': 'intercept_status',
|
||||||
|
'juziseo_history': 'juziseo_history_status',
|
||||||
|
'juziseo_outlink': 'juziseo_outlink_status'
|
||||||
|
}
|
||||||
|
|
||||||
|
if status_type not in status_field_map:
|
||||||
|
return False
|
||||||
|
|
||||||
|
# 先检查domain_detections表中是否存在对应记录
|
||||||
|
check_sql = "SELECT id FROM domain_detections WHERE domain_id = %s"
|
||||||
|
existing_record = self.fetch_one(check_sql, (domain_id,))
|
||||||
|
|
||||||
|
if not existing_record:
|
||||||
|
# 如果不存在,先创建一条记录
|
||||||
|
insert_sql = "INSERT INTO domain_detections (domain_id, create_time, update_time) VALUES (%s, NOW(), NOW())"
|
||||||
|
if not self.execute(insert_sql, (domain_id,)):
|
||||||
|
return False
|
||||||
|
|
||||||
|
# 更新状态
|
||||||
|
field_name = status_field_map[status_type]
|
||||||
|
sql = f"UPDATE domain_detections SET {field_name} = %s, update_time = NOW() WHERE domain_id = %s"
|
||||||
|
return self.execute(sql, (status, domain_id))
|
||||||
|
|
||||||
|
def get_detection_statuses(self, domain_id):
|
||||||
|
"""
|
||||||
|
获取域名的检测状态
|
||||||
|
|
||||||
|
:param domain_id: 域名ID
|
||||||
|
:return: dict - 检测状态字典
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
sql = "SELECT whois_status, beian_status, intercept_status, juziseo_history_status, juziseo_outlink_status FROM domain_detections WHERE domain_id = %s"
|
||||||
|
result = self.fetch_one(sql, (domain_id,))
|
||||||
|
|
||||||
|
if result:
|
||||||
|
return {
|
||||||
|
'whois_status': result.get('whois_status', 0) if result.get('whois_status') is not None else 0,
|
||||||
|
'beian_status': result.get('beian_status', 0) if result.get('beian_status') is not None else 0,
|
||||||
|
'intercept_status': result.get('intercept_status', 0) if result.get('intercept_status') is not None else 0,
|
||||||
|
'juziseo_history_status': result.get('juziseo_history_status', 0) if result.get('juziseo_history_status') is not None else 0,
|
||||||
|
'juziseo_outlink_status': result.get('juziseo_outlink_status', 0) if result.get('juziseo_outlink_status') is not None else 0
|
||||||
|
}
|
||||||
|
else:
|
||||||
|
return {
|
||||||
|
'whois_status': 0,
|
||||||
|
'beian_status': 0,
|
||||||
|
'intercept_status': 0,
|
||||||
|
'juziseo_history_status': 0,
|
||||||
|
'juziseo_outlink_status': 0
|
||||||
|
}
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f"获取检测状态失败: {e}")
|
||||||
|
return {
|
||||||
|
'whois_status': 0,
|
||||||
|
'beian_status': 0,
|
||||||
|
'intercept_status': 0,
|
||||||
|
'juziseo_history_status': 0,
|
||||||
|
'juziseo_outlink_status': 0
|
||||||
|
}
|
||||||
|
|
||||||
|
def get_domains_to_detect(self, limit=1000, detect_options=None):
|
||||||
"""
|
"""
|
||||||
获取需要检测的域名
|
获取需要检测的域名
|
||||||
|
|
||||||
:param limit: 限制数量
|
:param limit: 限制数量
|
||||||
|
:param detect_options: 检测选项字典,如 {'detect_whois': True, 'detect_beian': True, ...}
|
||||||
:return: list - 域名列表
|
:return: list - 域名列表
|
||||||
"""
|
"""
|
||||||
|
if detect_options:
|
||||||
|
# 构建检测状态条件
|
||||||
|
status_conditions = []
|
||||||
|
params = []
|
||||||
|
|
||||||
|
# 检查每个检测选项
|
||||||
|
if detect_options.get('detect_whois', False):
|
||||||
|
status_conditions.append("(dd.whois_status = 0 OR dd.whois_status IS NULL)")
|
||||||
|
if detect_options.get('detect_beian', False):
|
||||||
|
status_conditions.append("(dd.beian_status = 0 OR dd.beian_status IS NULL)")
|
||||||
|
if detect_options.get('detect_intercept', False):
|
||||||
|
status_conditions.append("(dd.intercept_status = 0 OR dd.intercept_status IS NULL)")
|
||||||
|
if detect_options.get('detect_juziseo', False):
|
||||||
|
status_conditions.append("(dd.juziseo_history_status = 0 OR dd.juziseo_history_status IS NULL)")
|
||||||
|
if detect_options.get('detect_juziseo_outlink', False):
|
||||||
|
status_conditions.append("(dd.juziseo_outlink_status = 0 OR dd.juziseo_outlink_status IS NULL)")
|
||||||
|
|
||||||
|
# 构建SQL查询
|
||||||
|
if status_conditions:
|
||||||
|
status_condition = " OR ".join(status_conditions)
|
||||||
|
sql = f"""
|
||||||
|
SELECT DISTINCT d.id, d.domain, d.source_type FROM domains d
|
||||||
|
LEFT JOIN domain_detections dd ON d.id = dd.domain_id
|
||||||
|
WHERE d.detect_status != 3 AND (d.detect_status = 0 OR ({status_condition}))
|
||||||
|
ORDER BY d.id ASC
|
||||||
|
LIMIT %s
|
||||||
|
"""
|
||||||
|
else:
|
||||||
|
# 如果没有检测选项,只获取detect_status=0的记录
|
||||||
|
sql = """
|
||||||
|
SELECT id, domain, source_type FROM domains
|
||||||
|
WHERE detect_status = 0
|
||||||
|
ORDER BY id ASC
|
||||||
|
LIMIT %s
|
||||||
|
"""
|
||||||
|
return self.fetch_all(sql, (limit,))
|
||||||
|
|
||||||
|
# 默认查询逻辑
|
||||||
sql = """
|
sql = """
|
||||||
SELECT id, domain, source_type FROM domains
|
SELECT id, domain, source_type FROM domains
|
||||||
WHERE detect_status IN (0, 3) OR (use_status = 0 AND detect_status = 1 AND register_status = 3 AND expire_date < CURRENT_DATE)
|
WHERE detect_status IN (0, 3) OR (use_status = 0 AND detect_status = 1 AND register_status = 3 AND expire_date < CURRENT_DATE)
|
||||||
@@ -1147,6 +1269,10 @@ class Database:
|
|||||||
sql += " AND d.review_status = %s"
|
sql += " AND d.review_status = %s"
|
||||||
params.append(conditions['review_status'])
|
params.append(conditions['review_status'])
|
||||||
|
|
||||||
|
if 'has_beian' in conditions and conditions['has_beian'] is not None:
|
||||||
|
sql += " AND d.has_beian = %s"
|
||||||
|
params.append(conditions['has_beian'])
|
||||||
|
|
||||||
# 其他条件保持不变
|
# 其他条件保持不变
|
||||||
if conditions.get('beian_year'):
|
if conditions.get('beian_year'):
|
||||||
sql += " AND d.beian_year = %s"
|
sql += " AND d.beian_year = %s"
|
||||||
@@ -1212,6 +1338,10 @@ class Database:
|
|||||||
sql += " AND d.review_status = %s"
|
sql += " AND d.review_status = %s"
|
||||||
params.append(conditions['review_status'])
|
params.append(conditions['review_status'])
|
||||||
|
|
||||||
|
if 'has_beian' in conditions and conditions['has_beian'] is not None:
|
||||||
|
sql += " AND d.has_beian = %s"
|
||||||
|
params.append(conditions['has_beian'])
|
||||||
|
|
||||||
# 其他条件保持不变
|
# 其他条件保持不变
|
||||||
if conditions.get('beian_year'):
|
if conditions.get('beian_year'):
|
||||||
sql += " AND d.beian_year = %s"
|
sql += " AND d.beian_year = %s"
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -523,6 +523,7 @@ class JC(object): # 聚查网API封装类
|
|||||||
# j = JC() # 创建JC实例
|
# j = JC() # 创建JC实例
|
||||||
# j.load_cookies()
|
# j.load_cookies()
|
||||||
# j.load_juming_cookies() # 加载聚名网Cookie
|
# j.load_juming_cookies() # 加载聚名网Cookie
|
||||||
|
# logger.info(j.juming_cookie)
|
||||||
# logger.info("开始登录...")
|
# logger.info("开始登录...")
|
||||||
# login_result = j.auth_login() # 使用聚名网账号登录聚查网
|
# login_result = j.auth_login() # 使用聚名网账号登录聚查网
|
||||||
# logger.info(f"登录结果: {login_result}")
|
# logger.info(f"登录结果: {login_result}")
|
||||||
|
|||||||
211
detect/juming.py
211
detect/juming.py
@@ -14,6 +14,7 @@ import json # JSON处理模块
|
|||||||
import os # 操作系统接口模块
|
import os # 操作系统接口模块
|
||||||
import pickle # 序列化模块
|
import pickle # 序列化模块
|
||||||
import random # 随机数生成模块
|
import random # 随机数生成模块
|
||||||
|
import re
|
||||||
import subprocess # 子进程管理模块
|
import subprocess # 子进程管理模块
|
||||||
import time # 时间处理模块
|
import time # 时间处理模块
|
||||||
from functools import partial
|
from functools import partial
|
||||||
@@ -23,7 +24,6 @@ import requests # HTTP请求库
|
|||||||
from loguru import logger # 日志记录库
|
from loguru import logger # 日志记录库
|
||||||
from requests.cookies import RequestsCookieJar # Cookie处理
|
from requests.cookies import RequestsCookieJar # Cookie处理
|
||||||
|
|
||||||
|
|
||||||
# 常量定义
|
# 常量定义
|
||||||
BASE_URL = "https://www.juming.com" # 聚名网基础URL
|
BASE_URL = "https://www.juming.com" # 聚名网基础URL
|
||||||
CAPTCHA_MAX_RETRY = 5 # 验证码最大重试次数
|
CAPTCHA_MAX_RETRY = 5 # 验证码最大重试次数
|
||||||
@@ -46,6 +46,7 @@ startupinfo = subprocess.STARTUPINFO()
|
|||||||
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
||||||
subprocess.Popen = partial(subprocess.Popen, encoding='utf-8', startupinfo=startupinfo)
|
subprocess.Popen = partial(subprocess.Popen, encoding='utf-8', startupinfo=startupinfo)
|
||||||
|
|
||||||
|
|
||||||
def calculate_seed(t: int) -> str: # 计算验证码种子值
|
def calculate_seed(t: int) -> str: # 计算验证码种子值
|
||||||
now = int(time.time()) # 获取当前时间戳
|
now = int(time.time()) # 获取当前时间戳
|
||||||
c = now - t # 计算时间差
|
c = now - t # 计算时间差
|
||||||
@@ -110,6 +111,113 @@ def encrypt_password(loginToken: str, password: str) -> str: # 加密密码
|
|||||||
return final_result # 返回最终加密结果
|
return final_result # 返回最终加密结果
|
||||||
|
|
||||||
|
|
||||||
|
def decode_a0j_strings(js_content):
|
||||||
|
"""
|
||||||
|
从 JS 代码中提取 a0i 字符串数组,并模拟 a0j 解码函数还原所有字符串。
|
||||||
|
|
||||||
|
JS 中的 a0j 函数使用自定义 Base64 alphabet 进行字符串解码:
|
||||||
|
- 原始 alphabet: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=
|
||||||
|
- 标准 alphabet: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
||||||
|
"""
|
||||||
|
# 兼容多行和单行压缩格式
|
||||||
|
match = re.search(r"var N\s*=\s*\[(.*?)\];\s*a0i\s*=\s*function", js_content, re.DOTALL)
|
||||||
|
if not match:
|
||||||
|
# 尝试更宽松的正则
|
||||||
|
match = re.search(r"var N=\[(.*?)\];function a0i\(\)", js_content, re.DOTALL)
|
||||||
|
if not match:
|
||||||
|
raise ValueError("无法找到 a0i 数组")
|
||||||
|
|
||||||
|
arr_str = match.group(1)
|
||||||
|
strings = re.findall(r"'([^']*?)'", arr_str)
|
||||||
|
|
||||||
|
def a0j_decode(index):
|
||||||
|
d = index - 0xfb
|
||||||
|
if d < 0 or d >= len(strings):
|
||||||
|
return None
|
||||||
|
encoded = strings[d]
|
||||||
|
|
||||||
|
# 转换自定义 Base64 到标准 Base64
|
||||||
|
std_b64 = encoded.translate(str.maketrans(
|
||||||
|
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=',
|
||||||
|
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='
|
||||||
|
))
|
||||||
|
|
||||||
|
padding = 4 - len(std_b64) % 4
|
||||||
|
if padding != 4:
|
||||||
|
std_b64 += '=' * padding
|
||||||
|
|
||||||
|
try:
|
||||||
|
return base64.b64decode(std_b64).decode('utf-8')
|
||||||
|
except Exception:
|
||||||
|
return encoded
|
||||||
|
|
||||||
|
decoded_strings = {}
|
||||||
|
for i in range(0xfb, 0xfb + len(strings)):
|
||||||
|
decoded_strings[i] = a0j_decode(i)
|
||||||
|
|
||||||
|
return decoded_strings, strings
|
||||||
|
|
||||||
|
|
||||||
|
def decrypt_arg1(arg1, m_arr, key_str):
|
||||||
|
"""
|
||||||
|
核心解密逻辑:
|
||||||
|
1. 按 m 数组重排 arg1 字符
|
||||||
|
2. 与密钥 key_str 进行 XOR 运算
|
||||||
|
"""
|
||||||
|
# 步骤1:按 m 数组重排
|
||||||
|
q = [''] * len(m_arr)
|
||||||
|
for i, ch in enumerate(arg1):
|
||||||
|
for j, idx in enumerate(m_arr):
|
||||||
|
if idx == i + 1:
|
||||||
|
q[j] = ch
|
||||||
|
u = ''.join(q)
|
||||||
|
|
||||||
|
# 步骤2:与密钥进行 XOR
|
||||||
|
v = ''
|
||||||
|
max_len = min(len(u), len(key_str))
|
||||||
|
for x in range(0, max_len, 2):
|
||||||
|
u_val = int(u[x:x + 2], 16)
|
||||||
|
p_val = int(key_str[x:x + 2], 16)
|
||||||
|
xor_result = u_val ^ p_val
|
||||||
|
v += f"{xor_result:02x}"
|
||||||
|
|
||||||
|
return v
|
||||||
|
|
||||||
|
|
||||||
|
def extract_params(js_content):
|
||||||
|
"""从 JS 代码中提取所有关键参数"""
|
||||||
|
|
||||||
|
# 解码字符串表
|
||||||
|
decoded_strings, raw_strings = decode_a0j_strings(js_content)
|
||||||
|
|
||||||
|
# 提取 arg1(兼容空格和压缩格式)
|
||||||
|
arg1_match = re.search(r"var arg1\s*=\s*'([A-Fa-f0-9]+)'", js_content)
|
||||||
|
arg1 = arg1_match.group(1) if arg1_match else ''
|
||||||
|
|
||||||
|
# 提取 m 数组(兼容空格和压缩格式)
|
||||||
|
m_match = re.search(r"var m\s*=\s*\[(.*?)\]", js_content)
|
||||||
|
m_arr = []
|
||||||
|
if m_match:
|
||||||
|
m_str = m_match.group(1)
|
||||||
|
m_arr = [int(x.strip(), 16) for x in m_str.split(',')]
|
||||||
|
|
||||||
|
# 查找密钥
|
||||||
|
# 注意:a0j 函数有自修改机制,实际密钥可能不在 0x115
|
||||||
|
# 通过长度判断哪个是十六进制密钥(应该是 40 位数字字符串)
|
||||||
|
key_p = ''
|
||||||
|
for idx, val in decoded_strings.items():
|
||||||
|
if val and len(val) >= 30 and all(c in '0123456789' for c in val):
|
||||||
|
key_p = val
|
||||||
|
break
|
||||||
|
|
||||||
|
return {
|
||||||
|
'arg1': arg1,
|
||||||
|
'm_arr': m_arr,
|
||||||
|
'key': key_p,
|
||||||
|
'decoded_strings': decoded_strings
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class JM(object): # 聚名网API封装类
|
class JM(object): # 聚名网API封装类
|
||||||
token: str # 验证码token
|
token: str # 验证码token
|
||||||
loginToken: str = '' # 登录令牌
|
loginToken: str = '' # 登录令牌
|
||||||
@@ -124,7 +232,8 @@ class JM(object): # 聚名网API封装类
|
|||||||
'Host': 'www.juming.com', # 主机名
|
'Host': 'www.juming.com', # 主机名
|
||||||
'sec-ch-ua-platform': '"Windows"', # 平台标识
|
'sec-ch-ua-platform': '"Windows"', # 平台标识
|
||||||
'x-requested-with': 'XMLHttpRequest', # AJAX请求标识
|
'x-requested-with': 'XMLHttpRequest', # AJAX请求标识
|
||||||
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 Edg/146.0.0.0', # 用户代理
|
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 Edg/146.0.0.0',
|
||||||
|
# 用户代理
|
||||||
'accept': '*/*', # 接受所有类型
|
'accept': '*/*', # 接受所有类型
|
||||||
'sec-ch-ua': '"Chromium";v="146", "Not-A.Brand";v="24", "Microsoft Edge";v="146"', # 浏览器标识
|
'sec-ch-ua': '"Chromium";v="146", "Not-A.Brand";v="24", "Microsoft Edge";v="146"', # 浏览器标识
|
||||||
'sec-ch-ua-mobile': '?0', # 是否移动端
|
'sec-ch-ua-mobile': '?0', # 是否移动端
|
||||||
@@ -139,18 +248,21 @@ class JM(object): # 聚名网API封装类
|
|||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, proxies: Optional[Dict] = None): # 初始化方法
|
def __init__(self, proxies: Optional[Dict] = None): # 初始化方法
|
||||||
|
self.acw_sc__v2 = None
|
||||||
self.session = requests.Session() # 创建会话对象
|
self.session = requests.Session() # 创建会话对象
|
||||||
self.session.timeout = REQUEST_TIMEOUT # 设置超时时间
|
self.session.timeout = REQUEST_TIMEOUT # 设置超时时间
|
||||||
self.session.proxies = proxies # 设置代理
|
self.session.proxies = proxies # 设置代理
|
||||||
self.base_url = BASE_URL # 设置基础URL
|
self.base_url = BASE_URL # 设置基础URL
|
||||||
logger.debug(proxies)
|
|
||||||
|
|
||||||
def captcha_init(self) -> Tuple[bool, str]: # 初始化滑块验证码
|
def captcha_init(self, retry_count=0) -> Tuple[bool, str]: # 初始化滑块验证码
|
||||||
"""
|
"""
|
||||||
初始化滑块验证码
|
初始化滑块验证码
|
||||||
Returns:
|
Returns:
|
||||||
Tuple[bool, str]: (是否成功, 消息)
|
Tuple[bool, str]: (是否成功, 消息)
|
||||||
"""
|
"""
|
||||||
|
if retry_count > 3: # 限制递归深度
|
||||||
|
return False, "验证码初始化失败:重试次数过多"
|
||||||
|
|
||||||
self.fingerprint = random_fingerprint() # 生成随机指纹
|
self.fingerprint = random_fingerprint() # 生成随机指纹
|
||||||
data = { # 构建请求数据
|
data = { # 构建请求数据
|
||||||
"request_id": self.fingerprint, # 请求ID
|
"request_id": self.fingerprint, # 请求ID
|
||||||
@@ -162,22 +274,35 @@ class JM(object): # 聚名网API封装类
|
|||||||
|
|
||||||
url = f"{self.base_url}/captcha/init" # 初始化URL
|
url = f"{self.base_url}/captcha/init" # 初始化URL
|
||||||
# self.cookie.clear()
|
# self.cookie.clear()
|
||||||
# self.cookie.update({'acw_sc__v2': '69d948ed49117d89433d4316a79ada6f00d68f26'})
|
# self.cookie.update({'acw_sc__v2': '69e9cfd94b5ec072ae8cd67b6f06ff5a0c0e70c8'})
|
||||||
# logger.info(self.cookie)
|
# logger.info(self.cookie)
|
||||||
response = self.session.post(url, headers=self.headers, data=data, cookies=self.cookie).json() # 发送请求
|
res = self.session.post(url, headers=self.headers, data=data, cookies=self.cookie) # 发送请求
|
||||||
logger.info(response)
|
try:
|
||||||
|
response = res.json()
|
||||||
|
logger.info(response)
|
||||||
|
|
||||||
if response['code'] == 1: # 初始化成功
|
if response['code'] == 1: # 初始化成功
|
||||||
self.captchaId = response['data']['captchaId'] # 保存验证码ID
|
self.captchaId = response['data']['captchaId'] # 保存验证码ID
|
||||||
self.encryptionPublicKey = response['data']['encryptionPublicKey'] # 保存加密公钥
|
self.encryptionPublicKey = response['data']['encryptionPublicKey'] # 保存加密公钥
|
||||||
return response['code'] == 1, response['msg'] # 返回结果
|
return response['code'] == 1, response['msg'] # 返回结果
|
||||||
|
except:
|
||||||
|
js_content = res.content.decode('utf8')
|
||||||
|
params = extract_params(js_content)
|
||||||
|
logger.info(params)
|
||||||
|
self.acw_sc__v2 = decrypt_arg1(params['arg1'], params['m_arr'], params['key'])
|
||||||
|
self.cookie.update({'acw_sc__v2': self.acw_sc__v2})
|
||||||
|
logger.info(self.cookie)
|
||||||
|
return self.captcha_init(retry_count + 1)
|
||||||
|
|
||||||
def captcha_verify(self) -> Tuple[bool, str]: # 验证滑块验证码
|
def captcha_verify(self, retry_count=0) -> Tuple[bool, str]: # 验证滑块验证码
|
||||||
"""
|
"""
|
||||||
验证滑块验证码
|
验证滑块验证码
|
||||||
Returns:
|
Returns:
|
||||||
Tuple[bool, str]: (是否成功, 消息)
|
Tuple[bool, str]: (是否成功, 消息)
|
||||||
"""
|
"""
|
||||||
|
if retry_count > 3: # 限制递归深度
|
||||||
|
return False, "验证码验证失败:重试次数过多"
|
||||||
|
|
||||||
data = { # 构建验证数据
|
data = { # 构建验证数据
|
||||||
"offset": SLIDE_OFFSET, # 滑块偏移量
|
"offset": SLIDE_OFFSET, # 滑块偏移量
|
||||||
"duration": SLIDE_DURATION, # 滑动持续时间
|
"duration": SLIDE_DURATION, # 滑动持续时间
|
||||||
@@ -214,7 +339,7 @@ class JM(object): # 聚名网API封装类
|
|||||||
data_str = json.dumps(data, separators=(",", ":")) # 转换为JSON字符串(压缩格式)
|
data_str = json.dumps(data, separators=(",", ":")) # 转换为JSON字符串(压缩格式)
|
||||||
current_dir = os.path.dirname(__file__)
|
current_dir = os.path.dirname(__file__)
|
||||||
|
|
||||||
jsFile_path = current_dir+"/sdk_leg_env.js" # JavaScript脚本路径
|
jsFile_path = current_dir + "/sdk_leg_env.js" # JavaScript脚本路径
|
||||||
|
|
||||||
if not os.path.exists(jsFile_path): # 检查脚本文件是否存在
|
if not os.path.exists(jsFile_path): # 检查脚本文件是否存在
|
||||||
logger.error(f"Node.js脚本文件不存在: {jsFile_path}") # 记录错误
|
logger.error(f"Node.js脚本文件不存在: {jsFile_path}") # 记录错误
|
||||||
@@ -241,7 +366,10 @@ class JM(object): # 聚名网API封装类
|
|||||||
|
|
||||||
url = f"{self.base_url}/captcha/verify" # 验证URL
|
url = f"{self.base_url}/captcha/verify" # 验证URL
|
||||||
self.headers['Content-Type'] = 'application/json' # 设置内容类型
|
self.headers['Content-Type'] = 'application/json' # 设置内容类型
|
||||||
response = self.session.post(url, headers=self.headers, data=verify_data, cookies=self.cookie).json() # 发送验证请求
|
res = self.session.post(url, headers=self.headers, data=verify_data,
|
||||||
|
cookies=self.cookie) # 发送验证请求
|
||||||
|
response = res.json() # 解析JSON响应
|
||||||
|
|
||||||
if response['code'] == 1: # 验证成功
|
if response['code'] == 1: # 验证成功
|
||||||
self.token = response['data']['token'] # 保存token
|
self.token = response['data']['token'] # 保存token
|
||||||
self.session_id = response['data']['session_id'] # 保存会话ID
|
self.session_id = response['data']['session_id'] # 保存会话ID
|
||||||
@@ -249,7 +377,17 @@ class JM(object): # 聚名网API封装类
|
|||||||
except subprocess.TimeoutExpired: # 超时异常
|
except subprocess.TimeoutExpired: # 超时异常
|
||||||
logger.error("Node.js脚本执行超时") # 记录错误
|
logger.error("Node.js脚本执行超时") # 记录错误
|
||||||
return False, "Node.js脚本执行超时" # 返回失败
|
return False, "Node.js脚本执行超时" # 返回失败
|
||||||
|
except requests.exceptions.JSONDecodeError: # JSON解析错误
|
||||||
|
js_content = res.content.decode('utf8')
|
||||||
|
params = extract_params(js_content)
|
||||||
|
logger.info(params)
|
||||||
|
self.acw_sc__v2 = decrypt_arg1(params['arg1'], params['m_arr'], params['key'])
|
||||||
|
self.cookie.update({'acw_sc__v2': self.acw_sc__v2})
|
||||||
|
logger.info(self.cookie)
|
||||||
|
return self.captcha_verify(retry_count + 1)
|
||||||
|
|
||||||
except Exception as e: # 其他异常
|
except Exception as e: # 其他异常
|
||||||
|
logger.info(type(e))
|
||||||
logger.error(f"执行Node.js脚本异常: {str(e)}") # 记录错误
|
logger.error(f"执行Node.js脚本异常: {str(e)}") # 记录错误
|
||||||
return False, f"执行Node.js脚本异常: {str(e)}" # 返回失败
|
return False, f"执行Node.js脚本异常: {str(e)}" # 返回失败
|
||||||
|
|
||||||
@@ -266,7 +404,8 @@ class JM(object): # 聚名网API封装类
|
|||||||
try: # 异常处理
|
try: # 异常处理
|
||||||
response = self.session.post(url, headers=self.headers).json() # 发送请求
|
response = self.session.post(url, headers=self.headers).json() # 发送请求
|
||||||
self.token = response['data']["token"] # 保存token
|
self.token = response['data']["token"] # 保存token
|
||||||
return response['code'] == 1, response['msg'], response['data']['url'] if response['code'] == 1 else None # 返回结果
|
return response['code'] == 1, response['msg'], response['data']['url'] if response[
|
||||||
|
'code'] == 1 else None # 返回结果
|
||||||
except Exception as e: # 异常处理
|
except Exception as e: # 异常处理
|
||||||
return False, f"请求失败: {str(e)}", None # 返回失败
|
return False, f"请求失败: {str(e)}", None # 返回失败
|
||||||
|
|
||||||
@@ -320,7 +459,10 @@ class JM(object): # 聚名网API封装类
|
|||||||
msg = result.get("msg", "登录接口未返回消息") # 获取消息
|
msg = result.get("msg", "登录接口未返回消息") # 获取消息
|
||||||
|
|
||||||
if code == 1: # 登录成功
|
if code == 1: # 登录成功
|
||||||
|
self.cookie.clear()
|
||||||
self.cookie = response.cookies # 保存Cookie
|
self.cookie = response.cookies # 保存Cookie
|
||||||
|
self.cookie.update({'acw_sc__v2': self.acw_sc__v2})
|
||||||
|
logger.info(self.cookie)
|
||||||
return True, msg # 返回成功
|
return True, msg # 返回成功
|
||||||
|
|
||||||
elif code == -118: # token过期
|
elif code == -118: # token过期
|
||||||
@@ -337,7 +479,8 @@ class JM(object): # 聚名网API封装类
|
|||||||
except Exception as e: # 异常处理
|
except Exception as e: # 异常处理
|
||||||
return False, f"请求失败: {str(e)}" # 返回失败
|
return False, f"请求失败: {str(e)}" # 返回失败
|
||||||
|
|
||||||
def ykj_get_list(self, page: int = 1, page_size: int = 50, data: Optional[Dict] = None) -> Tuple[bool, Any]: # 获取一口价域名列表
|
def ykj_get_list(self, page: int = 1, page_size: int = 50, data: Optional[Dict] = None) -> Tuple[
|
||||||
|
bool, Any]: # 获取一口价域名列表
|
||||||
"""
|
"""
|
||||||
获取一口价域名列表
|
获取一口价域名列表
|
||||||
Args:
|
Args:
|
||||||
@@ -357,6 +500,8 @@ class JM(object): # 聚名网API封装类
|
|||||||
res = self.session.post(url, headers=self.headers, data=data, cookies=self.cookie) # 发送请求
|
res = self.session.post(url, headers=self.headers, data=data, cookies=self.cookie) # 发送请求
|
||||||
|
|
||||||
response = res.json() # 解析响应
|
response = res.json() # 解析响应
|
||||||
|
logger.info(response)
|
||||||
|
|
||||||
if response['code'] == -401: # 需要验证码
|
if response['code'] == -401: # 需要验证码
|
||||||
captcha_response = False, f'滑块验证码失败,{CAPTCHA_MAX_RETRY}次内未成功' # 默认失败
|
captcha_response = False, f'滑块验证码失败,{CAPTCHA_MAX_RETRY}次内未成功' # 默认失败
|
||||||
for _ in range(CAPTCHA_MAX_RETRY): # 循环尝试验证
|
for _ in range(CAPTCHA_MAX_RETRY): # 循环尝试验证
|
||||||
@@ -373,11 +518,12 @@ class JM(object): # 聚名网API封装类
|
|||||||
'sessionId': self.session_id,
|
'sessionId': self.session_id,
|
||||||
}, separators=(",", ":"))
|
}, separators=(",", ":"))
|
||||||
}
|
}
|
||||||
return self.ykj_get_list(page, page_size,data=data) # 递归调用
|
return self.ykj_get_list(page, page_size, data=data) # 递归调用
|
||||||
return captcha_response[0], captcha_response[1] # 返回验证码结果
|
return captcha_response[0], captcha_response[1] # 返回验证码结果
|
||||||
|
|
||||||
elif response['code'] == 1 and response.get('data') == 'yzmhuaok': # 验证码通过
|
elif response['code'] == 1 and response.get('data') == 'yzmhuaok': # 验证码通过
|
||||||
self.cookie = res.cookies # 更新Cookie
|
self.cookie.update(res.cookies)
|
||||||
|
# self.save_cookies()
|
||||||
return self.ykj_get_list(page, page_size) # 递归调用
|
return self.ykj_get_list(page, page_size) # 递归调用
|
||||||
|
|
||||||
elif response['code'] == 1 and response.get('html'): # 成功获取HTML
|
elif response['code'] == 1 and response.get('html'): # 成功获取HTML
|
||||||
@@ -402,7 +548,23 @@ class JM(object): # 聚名网API封装类
|
|||||||
response = self.session.get(url, timeout=DOWNLOAD_TIMEOUT) # 下载文件
|
response = self.session.get(url, timeout=DOWNLOAD_TIMEOUT) # 下载文件
|
||||||
response_text = response.content.decode('utf-8') # 解码内容
|
response_text = response.content.decode('utf-8') # 解码内容
|
||||||
lines = response_text.strip().splitlines() # 按行分割
|
lines = response_text.strip().splitlines() # 按行分割
|
||||||
return lines # 返回域名列表
|
|
||||||
|
# 过滤掉可能包含的日期和非域名行
|
||||||
|
domains = []
|
||||||
|
for line in lines:
|
||||||
|
line = line.strip()
|
||||||
|
# 过滤掉空行
|
||||||
|
if not line:
|
||||||
|
continue
|
||||||
|
# 过滤掉日期格式的行(YYYY-MM-DD)
|
||||||
|
if re.match(r'^\d{4}-\d{2}-\d{2}$', line):
|
||||||
|
continue
|
||||||
|
# 过滤掉可能的标题行
|
||||||
|
if '域名' in line or 'domain' in line.lower():
|
||||||
|
continue
|
||||||
|
domains.append(line)
|
||||||
|
|
||||||
|
return domains # 返回过滤后的域名列表
|
||||||
except Exception as e: # 异常处理
|
except Exception as e: # 异常处理
|
||||||
logger.error(f"<获取删除域名列表错误>: {str(e)}") # 记录错误
|
logger.error(f"<获取删除域名列表错误>: {str(e)}") # 记录错误
|
||||||
return [] # 返回空列表
|
return [] # 返回空列表
|
||||||
@@ -415,7 +577,7 @@ class JM(object): # 聚名网API封装类
|
|||||||
"""
|
"""
|
||||||
with open(filepath, "wb") as f: # 以二进制写入模式打开文件
|
with open(filepath, "wb") as f: # 以二进制写入模式打开文件
|
||||||
pickle.dump(self.cookie, f) # 序列化保存
|
pickle.dump(self.cookie, f) # 序列化保存
|
||||||
|
|
||||||
# 保存到Redis
|
# 保存到Redis
|
||||||
try:
|
try:
|
||||||
import redis
|
import redis
|
||||||
@@ -453,18 +615,21 @@ class JM(object): # 聚名网API封装类
|
|||||||
# m = JM() # 创建JM实例
|
# m = JM() # 创建JM实例
|
||||||
#
|
#
|
||||||
# # 账号密码登录(请替换为您的账号密码)
|
# # 账号密码登录(请替换为您的账号密码)
|
||||||
# email = 'chaofanai1998@gmail.com' # 邮箱账号
|
# email = 'chaofanai1998@gmail.com' # 邮箱账号
|
||||||
# password = 'llzz123,./' # 密码
|
# password = 'llzz123,./' # 密码
|
||||||
#
|
#
|
||||||
# logger.info(f"开始登录: {email}") # 记录日志
|
# logger.info(f"开始登录: {email}") # 记录日志
|
||||||
# login_result = m.user_zh_p_login(email, password) # 执行登录
|
# login_result = m.user_zh_p_login(email, password) # 执行登录
|
||||||
# logger.info(f"登录结果: {login_result}") # 记录结果
|
# logger.info(f"登录结果: {login_result}") # 记录结果
|
||||||
#
|
#
|
||||||
|
# m.save_cookies() # 保存Cookie
|
||||||
|
#
|
||||||
# if not login_result[0]: # 登录失败
|
# if not login_result[0]: # 登录失败
|
||||||
# logger.error("登录失败,程序退出") # 记录错误
|
# logger.error("登录失败,程序退出") # 记录错误
|
||||||
# exit(1) # 退出程序
|
# exit(1) # 退出程序
|
||||||
#
|
# #
|
||||||
# m.load_cookies() # 加载Cookie
|
# # m.load_cookies() # 加载Cookie
|
||||||
|
# logger.info(m.cookie)
|
||||||
#
|
#
|
||||||
# # 获取一口价域名
|
# # 获取一口价域名
|
||||||
# import re # 导入正则表达式模块
|
# import re # 导入正则表达式模块
|
||||||
|
|||||||
Binary file not shown.
243
detect_worker.2026-04-14_21-55-17_560012.log
Normal file
243
detect_worker.2026-04-14_21-55-17_560012.log
Normal file
@@ -0,0 +1,243 @@
|
|||||||
|
2026-04-14 21:55:17.560 | INFO | __main__:<module>:1922 - 程序开始运行
|
||||||
|
2026-04-14 21:55:17.571 | INFO | __main__:<module>:1926 - 创建应用程序成功
|
||||||
|
2026-04-14 21:55:17.572 | INFO | __main__:__init__:66 - 当前文件路径: G:\PyCode\domainScanDemo\detect_worker.py
|
||||||
|
2026-04-14 21:55:17.572 | INFO | __main__:__init__:67 - 当前目录: G:\PyCode\domainScanDemo
|
||||||
|
2026-04-14 21:55:17.572 | INFO | __main__:__init__:77 - 开发环境目录: G:\
|
||||||
|
2026-04-14 21:55:17.572 | INFO | __main__:__init__:81 - SVG图标路径: G:\new_logo.svg
|
||||||
|
2026-04-14 21:55:17.572 | WARNING | __main__:__init__:95 - SVG图标文件不存在: G:\new_logo.svg
|
||||||
|
2026-04-14 21:55:17.572 | INFO | __main__:__init__:99 - ICO图标路径: G:\favicon2.ico
|
||||||
|
2026-04-14 21:55:17.572 | WARNING | __main__:__init__:113 - ICO图标文件不存在: G:\favicon2.ico
|
||||||
|
2026-04-14 21:55:22.896 | INFO | app.utils.database:_init_connection_pool:84 - 数据库连接池初始化成功,大小: 100
|
||||||
|
2026-04-14 21:55:22.938 | INFO | app.utils.database:__init__:59 - Redis 连接成功: 120.78.93.250:6379
|
||||||
|
2026-04-14 21:55:22.946 | INFO | app.utils.database:_init_bloom_filter:103 - 布隆过滤器已存在,直接使用
|
||||||
|
2026-04-14 21:55:23.006 | INFO | __main__:__init__:724 - Redis 连接成功: 120.78.93.250:6379
|
||||||
|
2026-04-14 21:55:23.014 | INFO | __main__:load_detect_options:800 - 从Redis加载检测选项成功: {'detect_register': False, 'detect_chinaz': False, 'detect_aizhan': False, 'detect_baidu_site': False, 'detect_360_site': False, 'detect_baidu_security': False, 'detect_whois': False, 'detect_beian': True, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}
|
||||||
|
2026-04-14 21:55:23.020 | INFO | __main__:load_proxy_config:854 - 从Redis加载代理配置成功: {'proxy_enable': True, 'proxy_url': ''}
|
||||||
|
2026-04-14 21:55:23.027 | INFO | __main__:load_thread_count:910 - 从Redis加载检测线程数成功: 1
|
||||||
|
2026-04-14 21:55:23.045 | DEBUG | app.utils.database:connect:140 - 线程 4544 从连接池获取连接成功
|
||||||
|
2026-04-14 21:55:23.056 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:55:23.057 | INFO | __main__:__init__:746 - 加载敏感词完成,共 430 个敏感词
|
||||||
|
2026-04-14 21:55:23.065 | INFO | __main__:load_cookies_from_remote:1780 - 从Redis加载聚名cookies成功并保存到本地
|
||||||
|
2026-04-14 21:55:23.072 | INFO | __main__:load_cookies_from_remote:1807 - 从Redis加载聚查cookies成功并保存到本地
|
||||||
|
2026-04-14 21:55:23.079 | INFO | __main__:load_cookies_from_remote:1834 - 从Redis加载桔子SEO cookies成功并保存到本地
|
||||||
|
2026-04-14 21:55:23.079 | INFO | __main__:__init__:769 - 检测端配置信息:
|
||||||
|
2026-04-14 21:55:23.080 | INFO | __main__:__init__:770 - 检测选项: {'detect_register': False, 'detect_chinaz': False, 'detect_aizhan': False, 'detect_baidu_site': False, 'detect_360_site': False, 'detect_baidu_security': False, 'detect_whois': False, 'detect_beian': True, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}
|
||||||
|
2026-04-14 21:55:23.080 | INFO | __main__:__init__:771 - 代理配置: {'proxy_enable': True, 'proxy_url': ''}
|
||||||
|
2026-04-14 21:55:23.080 | INFO | __main__:__init__:772 - 检测线程数: 1
|
||||||
|
2026-04-14 21:55:23.080 | DEBUG | __main__:__init__:414 - Redis配置更新订阅已启动
|
||||||
|
2026-04-14 21:55:23.081 | DEBUG | __main__:connect_signals:784 - 信号连接成功
|
||||||
|
2026-04-14 21:55:23.081 | DEBUG | __main__:update_config_labels:1846 - 发送配置更新事件
|
||||||
|
2026-04-14 21:55:23.081 | DEBUG | __main__:update_config_labels:1852 - 配置更新事件已发送
|
||||||
|
2026-04-14 21:55:23.082 | INFO | __main__:<module>:1930 - 创建主窗口成功
|
||||||
|
2026-04-14 21:55:23.264 | INFO | __main__:<module>:1932 - 显示主窗口成功
|
||||||
|
2026-04-14 21:55:23.264 | INFO | __main__:<module>:1935 - 开始运行应用程序
|
||||||
|
2026-04-14 21:55:23.266 | DEBUG | __main__:update_config_labels:593 - 开始更新GUI配置标签
|
||||||
|
2026-04-14 21:55:23.266 | DEBUG | __main__:update_config_labels:597 - worker对象存在,当前配置: {'detect_register': False, 'detect_chinaz': False, 'detect_aizhan': False, 'detect_baidu_site': False, 'detect_360_site': False, 'detect_baidu_security': False, 'detect_whois': False, 'detect_beian': True, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}, {'proxy_enable': True, 'proxy_url': ''}, 1
|
||||||
|
2026-04-14 21:55:23.266 | DEBUG | __main__:update_config_labels:635 - 准备更新标签: 检测选项: 8.聚查中的备案相关查询, 代理配置: 启用: 是, 检测线程数: 1
|
||||||
|
2026-04-14 21:55:23.266 | DEBUG | __main__:update_config_labels:660 - GUI配置标签更新完成
|
||||||
|
2026-04-14 21:55:23.291 | DEBUG | __main__:start_redis_subscription:1884 - 开始监听配置更新...
|
||||||
|
2026-04-14 21:56:09.982 | INFO | __main__:start_detection:1500 - 开始执行域名检测任务
|
||||||
|
2026-04-14 21:56:09.997 | INFO | __main__:load_detect_options:800 - 从Redis加载检测选项成功: {'detect_register': False, 'detect_chinaz': False, 'detect_aizhan': False, 'detect_baidu_site': False, 'detect_360_site': False, 'detect_baidu_security': False, 'detect_whois': False, 'detect_beian': True, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}
|
||||||
|
2026-04-14 21:56:10.008 | INFO | __main__:load_proxy_config:854 - 从Redis加载代理配置成功: {'proxy_enable': True, 'proxy_url': ''}
|
||||||
|
2026-04-14 21:56:10.015 | INFO | __main__:load_thread_count:910 - 从Redis加载检测线程数成功: 1
|
||||||
|
2026-04-14 21:56:10.015 | INFO | __main__:start_detection:1507 - 检测线程数设置为: 1
|
||||||
|
2026-04-14 21:56:10.023 | INFO | __main__:load_cookies_from_remote:1780 - 从Redis加载聚名cookies成功并保存到本地
|
||||||
|
2026-04-14 21:56:10.030 | INFO | __main__:load_cookies_from_remote:1807 - 从Redis加载聚查cookies成功并保存到本地
|
||||||
|
2026-04-14 21:56:10.037 | INFO | __main__:load_cookies_from_remote:1834 - 从Redis加载桔子SEO cookies成功并保存到本地
|
||||||
|
2026-04-14 21:56:10.044 | INFO | __main__:load_cookies_from_remote:1780 - 从Redis加载聚名cookies成功并保存到本地
|
||||||
|
2026-04-14 21:56:10.051 | INFO | __main__:load_cookies_from_remote:1807 - 从Redis加载聚查cookies成功并保存到本地
|
||||||
|
2026-04-14 21:56:10.058 | INFO | __main__:load_cookies_from_remote:1834 - 从Redis加载桔子SEO cookies成功并保存到本地
|
||||||
|
2026-04-14 21:56:10.059 | INFO | __main__:start_detection:1529 - 开始检测,刷新代理池
|
||||||
|
2026-04-14 21:56:10.059 | INFO | __main__:get_proxies:1075 - 代理池为空,刷新代理池
|
||||||
|
2026-04-14 21:56:10.060 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-14 21:56:10.060 | INFO | __main__:get_proxies:1075 - 代理池为空,刷新代理池
|
||||||
|
2026-04-14 21:56:10.060 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-14 21:56:10.069 | DEBUG | app.utils.database:connect:140 - 线程 19304 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:10.078 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:10.078 | INFO | __main__:start_detection:1541 - 重新加载敏感词完成,共 430 个敏感词
|
||||||
|
2026-04-14 21:56:10.078 | DEBUG | __main__:update_config_labels:1846 - 发送配置更新事件
|
||||||
|
2026-04-14 21:56:10.079 | DEBUG | __main__:update_config_labels:1852 - 配置更新事件已发送
|
||||||
|
2026-04-14 21:56:10.079 | DEBUG | __main__:update_config_labels:593 - 开始更新GUI配置标签
|
||||||
|
2026-04-14 21:56:10.079 | DEBUG | __main__:update_config_labels:597 - worker对象存在,当前配置: {'detect_register': False, 'detect_chinaz': False, 'detect_aizhan': False, 'detect_baidu_site': False, 'detect_360_site': False, 'detect_baidu_security': False, 'detect_whois': False, 'detect_beian': True, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}, {'proxy_enable': True, 'proxy_url': ''}, 1
|
||||||
|
2026-04-14 21:56:10.079 | DEBUG | __main__:update_config_labels:635 - 准备更新标签: 检测选项: 8.聚查中的备案相关查询, 代理配置: 启用: 是, 检测线程数: 1
|
||||||
|
2026-04-14 21:56:10.079 | DEBUG | __main__:update_config_labels:660 - GUI配置标签更新完成
|
||||||
|
2026-04-14 21:56:10.085 | DEBUG | app.utils.database:connect:140 - 线程 19304 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:10.113 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:10.114 | INFO | __main__:start_detection:1559 - 获取到 1000 个需要检测的域名
|
||||||
|
2026-04-14 21:56:10.114 | INFO | __main__:start_detection:1573 - 开始创建线程,当前批次域名数: 1000,最大线程数: 1
|
||||||
|
2026-04-14 21:56:10.114 | DEBUG | __main__:start_detection:1605 - 创建线程 1 成功,域名: billiardboys.com
|
||||||
|
2026-04-14 21:56:10.115 | INFO | __main__:detect_domain:1129 - 线程 19288 开始检测域名: billiardboys.com
|
||||||
|
2026-04-14 21:56:10.115 | DEBUG | __main__:start_detection:1615 - 启动线程 1 成功,域名: billiardboys.com
|
||||||
|
2026-04-14 21:56:10.115 | INFO | __main__:detect_domain:1137 - 开始检测域名: billiardboys.com
|
||||||
|
2026-04-14 21:56:10.119 | INFO | __main__:start_detection:1625 - 当前实际线程数量: 1/1
|
||||||
|
2026-04-14 21:56:10.120 | DEBUG | __main__:detect_domain:1141 - 线程 19288 使用共享敏感词,共 430 个敏感词
|
||||||
|
2026-04-14 21:56:10.120 | INFO | __main__:detect_domain:1357 - 检测聚查备案: billiardboys.com
|
||||||
|
2026-04-14 21:56:11.026 | INFO | __main__:detect_domain:1364 - 备案查询结果: True, 查询成功, ('', '', '', '未备案')
|
||||||
|
2026-04-14 21:56:11.035 | DEBUG | app.utils.database:connect:140 - 线程 19288 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:11.054 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:11.054 | INFO | __main__:detect_domain:1380 - 聚查备案检测完成: billiardboys.com
|
||||||
|
2026-04-14 21:56:11.071 | DEBUG | app.utils.database:connect:140 - 线程 19288 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:11.088 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:11.104 | DEBUG | app.utils.database:connect:140 - 线程 19288 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:11.113 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:11.113 | INFO | __main__:detect_domain:1489 - 域名检测完成: billiardboys.com
|
||||||
|
2026-04-14 21:56:11.209 | DEBUG | __main__:start_detection:1605 - 创建线程 2 成功,域名: bilvaerdiekspert.com
|
||||||
|
2026-04-14 21:56:11.209 | INFO | __main__:detect_domain:1129 - 线程 19088 开始检测域名: bilvaerdiekspert.com
|
||||||
|
2026-04-14 21:56:11.209 | DEBUG | __main__:start_detection:1615 - 启动线程 2 成功,域名: bilvaerdiekspert.com
|
||||||
|
2026-04-14 21:56:11.209 | INFO | __main__:detect_domain:1137 - 开始检测域名: bilvaerdiekspert.com
|
||||||
|
2026-04-14 21:56:11.210 | INFO | __main__:start_detection:1625 - 当前实际线程数量: 1/1
|
||||||
|
2026-04-14 21:56:11.210 | DEBUG | __main__:detect_domain:1141 - 线程 19088 使用共享敏感词,共 430 个敏感词
|
||||||
|
2026-04-14 21:56:11.210 | INFO | __main__:detect_domain:1357 - 检测聚查备案: bilvaerdiekspert.com
|
||||||
|
2026-04-14 21:56:11.548 | INFO | __main__:detect_domain:1364 - 备案查询结果: True, 查询成功, ('', '', '', '未备案')
|
||||||
|
2026-04-14 21:56:11.557 | DEBUG | app.utils.database:connect:140 - 线程 19088 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:11.574 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:11.574 | INFO | __main__:detect_domain:1380 - 聚查备案检测完成: bilvaerdiekspert.com
|
||||||
|
2026-04-14 21:56:11.591 | DEBUG | app.utils.database:connect:140 - 线程 19088 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:11.609 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:11.625 | DEBUG | app.utils.database:connect:140 - 线程 19088 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:11.634 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:11.634 | INFO | __main__:detect_domain:1489 - 域名检测完成: bilvaerdiekspert.com
|
||||||
|
2026-04-14 21:56:11.644 | DEBUG | __main__:start_detection:1605 - 创建线程 3 成功,域名: bimi-club.com
|
||||||
|
2026-04-14 21:56:11.644 | INFO | __main__:detect_domain:1129 - 线程 19092 开始检测域名: bimi-club.com
|
||||||
|
2026-04-14 21:56:11.644 | DEBUG | __main__:start_detection:1615 - 启动线程 3 成功,域名: bimi-club.com
|
||||||
|
2026-04-14 21:56:11.644 | INFO | __main__:detect_domain:1137 - 开始检测域名: bimi-club.com
|
||||||
|
2026-04-14 21:56:11.645 | INFO | __main__:start_detection:1625 - 当前实际线程数量: 1/1
|
||||||
|
2026-04-14 21:56:11.645 | DEBUG | __main__:detect_domain:1141 - 线程 19092 使用共享敏感词,共 430 个敏感词
|
||||||
|
2026-04-14 21:56:11.648 | INFO | __main__:detect_domain:1357 - 检测聚查备案: bimi-club.com
|
||||||
|
2026-04-14 21:56:11.987 | INFO | __main__:detect_domain:1364 - 备案查询结果: True, 查询成功, ('', '', '', '未备案')
|
||||||
|
2026-04-14 21:56:11.996 | DEBUG | app.utils.database:connect:140 - 线程 19092 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:12.014 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:12.014 | INFO | __main__:detect_domain:1380 - 聚查备案检测完成: bimi-club.com
|
||||||
|
2026-04-14 21:56:12.030 | DEBUG | app.utils.database:connect:140 - 线程 19092 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:12.047 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:12.064 | DEBUG | app.utils.database:connect:140 - 线程 19092 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:12.073 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:12.074 | INFO | __main__:detect_domain:1489 - 域名检测完成: bimi-club.com
|
||||||
|
2026-04-14 21:56:12.080 | DEBUG | __main__:start_detection:1605 - 创建线程 4 成功,域名: binduk.com
|
||||||
|
2026-04-14 21:56:12.080 | INFO | __main__:detect_domain:1129 - 线程 18724 开始检测域名: binduk.com
|
||||||
|
2026-04-14 21:56:12.080 | DEBUG | __main__:start_detection:1615 - 启动线程 4 成功,域名: binduk.com
|
||||||
|
2026-04-14 21:56:12.080 | INFO | __main__:detect_domain:1137 - 开始检测域名: binduk.com
|
||||||
|
2026-04-14 21:56:12.080 | INFO | __main__:start_detection:1625 - 当前实际线程数量: 1/1
|
||||||
|
2026-04-14 21:56:12.080 | DEBUG | __main__:detect_domain:1141 - 线程 18724 使用共享敏感词,共 430 个敏感词
|
||||||
|
2026-04-14 21:56:12.083 | INFO | __main__:detect_domain:1357 - 检测聚查备案: binduk.com
|
||||||
|
2026-04-14 21:56:12.480 | INFO | __main__:detect_domain:1364 - 备案查询结果: True, 查询成功, ('', '', '', '未备案')
|
||||||
|
2026-04-14 21:56:12.489 | DEBUG | app.utils.database:connect:140 - 线程 18724 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:12.508 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:12.509 | INFO | __main__:detect_domain:1380 - 聚查备案检测完成: binduk.com
|
||||||
|
2026-04-14 21:56:12.524 | DEBUG | app.utils.database:connect:140 - 线程 18724 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:12.542 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:12.559 | DEBUG | app.utils.database:connect:140 - 线程 18724 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:12.567 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:12.567 | INFO | __main__:detect_domain:1489 - 域名检测完成: binduk.com
|
||||||
|
2026-04-14 21:56:12.620 | DEBUG | __main__:start_detection:1605 - 创建线程 5 成功,域名: bingeearn.com
|
||||||
|
2026-04-14 21:56:12.620 | INFO | __main__:detect_domain:1129 - 线程 18728 开始检测域名: bingeearn.com
|
||||||
|
2026-04-14 21:56:12.620 | DEBUG | __main__:start_detection:1615 - 启动线程 5 成功,域名: bingeearn.com
|
||||||
|
2026-04-14 21:56:12.620 | INFO | __main__:detect_domain:1137 - 开始检测域名: bingeearn.com
|
||||||
|
2026-04-14 21:56:12.621 | INFO | __main__:start_detection:1625 - 当前实际线程数量: 1/1
|
||||||
|
2026-04-14 21:56:12.621 | DEBUG | __main__:detect_domain:1141 - 线程 18728 使用共享敏感词,共 430 个敏感词
|
||||||
|
2026-04-14 21:56:12.622 | INFO | __main__:detect_domain:1357 - 检测聚查备案: bingeearn.com
|
||||||
|
2026-04-14 21:56:12.965 | INFO | __main__:detect_domain:1364 - 备案查询结果: True, 查询成功, ('', '', '', '未备案')
|
||||||
|
2026-04-14 21:56:12.973 | DEBUG | app.utils.database:connect:140 - 线程 18728 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:12.994 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:12.994 | INFO | __main__:detect_domain:1380 - 聚查备案检测完成: bingeearn.com
|
||||||
|
2026-04-14 21:56:13.010 | DEBUG | app.utils.database:connect:140 - 线程 18728 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:13.027 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:13.043 | DEBUG | app.utils.database:connect:140 - 线程 18728 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:13.051 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:13.052 | INFO | __main__:detect_domain:1489 - 域名检测完成: bingeearn.com
|
||||||
|
2026-04-14 21:56:13.058 | DEBUG | __main__:start_detection:1605 - 创建线程 6 成功,域名: bingenxt.com
|
||||||
|
2026-04-14 21:56:13.058 | INFO | __main__:detect_domain:1129 - 线程 18704 开始检测域名: bingenxt.com
|
||||||
|
2026-04-14 21:56:13.058 | DEBUG | __main__:start_detection:1615 - 启动线程 6 成功,域名: bingenxt.com
|
||||||
|
2026-04-14 21:56:13.059 | INFO | __main__:detect_domain:1137 - 开始检测域名: bingenxt.com
|
||||||
|
2026-04-14 21:56:13.059 | INFO | __main__:start_detection:1625 - 当前实际线程数量: 1/1
|
||||||
|
2026-04-14 21:56:13.059 | DEBUG | __main__:detect_domain:1141 - 线程 18704 使用共享敏感词,共 430 个敏感词
|
||||||
|
2026-04-14 21:56:13.062 | INFO | __main__:detect_domain:1357 - 检测聚查备案: bingenxt.com
|
||||||
|
2026-04-14 21:56:13.438 | INFO | __main__:detect_domain:1364 - 备案查询结果: True, 查询成功, ('', '', '', '未备案')
|
||||||
|
2026-04-14 21:56:13.447 | DEBUG | app.utils.database:connect:140 - 线程 18704 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:13.465 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:13.465 | INFO | __main__:detect_domain:1380 - 聚查备案检测完成: bingenxt.com
|
||||||
|
2026-04-14 21:56:13.481 | DEBUG | app.utils.database:connect:140 - 线程 18704 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:13.499 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:13.515 | DEBUG | app.utils.database:connect:140 - 线程 18704 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:13.524 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:13.524 | INFO | __main__:detect_domain:1489 - 域名检测完成: bingenxt.com
|
||||||
|
2026-04-14 21:56:13.600 | DEBUG | __main__:start_detection:1605 - 创建线程 7 成功,域名: bioabdi.com
|
||||||
|
2026-04-14 21:56:13.600 | INFO | __main__:detect_domain:1129 - 线程 18752 开始检测域名: bioabdi.com
|
||||||
|
2026-04-14 21:56:13.600 | DEBUG | __main__:start_detection:1615 - 启动线程 7 成功,域名: bioabdi.com
|
||||||
|
2026-04-14 21:56:13.600 | INFO | __main__:detect_domain:1137 - 开始检测域名: bioabdi.com
|
||||||
|
2026-04-14 21:56:13.601 | INFO | __main__:start_detection:1625 - 当前实际线程数量: 1/1
|
||||||
|
2026-04-14 21:56:13.601 | DEBUG | __main__:detect_domain:1141 - 线程 18752 使用共享敏感词,共 430 个敏感词
|
||||||
|
2026-04-14 21:56:13.601 | INFO | __main__:detect_domain:1357 - 检测聚查备案: bioabdi.com
|
||||||
|
2026-04-14 21:56:14.482 | INFO | __main__:detect_domain:1364 - 备案查询结果: True, 查询成功, ('', '', '', '未备案')
|
||||||
|
2026-04-14 21:56:14.491 | DEBUG | app.utils.database:connect:140 - 线程 18752 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:14.509 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:14.509 | INFO | __main__:detect_domain:1380 - 聚查备案检测完成: bioabdi.com
|
||||||
|
2026-04-14 21:56:14.526 | DEBUG | app.utils.database:connect:140 - 线程 18752 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:14.543 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:14.560 | DEBUG | app.utils.database:connect:140 - 线程 18752 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:14.568 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:14.568 | INFO | __main__:detect_domain:1489 - 域名检测完成: bioabdi.com
|
||||||
|
2026-04-14 21:56:14.578 | DEBUG | __main__:start_detection:1605 - 创建线程 8 成功,域名: bissobazar.com
|
||||||
|
2026-04-14 21:56:14.578 | INFO | __main__:detect_domain:1129 - 线程 18976 开始检测域名: bissobazar.com
|
||||||
|
2026-04-14 21:56:14.578 | DEBUG | __main__:start_detection:1615 - 启动线程 8 成功,域名: bissobazar.com
|
||||||
|
2026-04-14 21:56:14.579 | INFO | __main__:detect_domain:1137 - 开始检测域名: bissobazar.com
|
||||||
|
2026-04-14 21:56:14.579 | INFO | __main__:start_detection:1625 - 当前实际线程数量: 1/1
|
||||||
|
2026-04-14 21:56:14.579 | DEBUG | __main__:detect_domain:1141 - 线程 18976 使用共享敏感词,共 430 个敏感词
|
||||||
|
2026-04-14 21:56:14.581 | INFO | __main__:detect_domain:1357 - 检测聚查备案: bissobazar.com
|
||||||
|
2026-04-14 21:56:15.185 | INFO | __main__:detect_domain:1364 - 备案查询结果: True, 查询成功, ('', '', '', '未备案')
|
||||||
|
2026-04-14 21:56:15.194 | DEBUG | app.utils.database:connect:140 - 线程 18976 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:15.212 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:15.212 | INFO | __main__:detect_domain:1380 - 聚查备案检测完成: bissobazar.com
|
||||||
|
2026-04-14 21:56:15.229 | DEBUG | app.utils.database:connect:140 - 线程 18976 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:15.246 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:15.261 | DEBUG | app.utils.database:connect:140 - 线程 18976 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:15.269 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:15.270 | INFO | __main__:detect_domain:1489 - 域名检测完成: bissobazar.com
|
||||||
|
2026-04-14 21:56:15.340 | DEBUG | __main__:start_detection:1605 - 创建线程 9 成功,域名: bitcoinmarketingexpert.com
|
||||||
|
2026-04-14 21:56:15.340 | INFO | __main__:detect_domain:1129 - 线程 15272 开始检测域名: bitcoinmarketingexpert.com
|
||||||
|
2026-04-14 21:56:15.340 | DEBUG | __main__:start_detection:1615 - 启动线程 9 成功,域名: bitcoinmarketingexpert.com
|
||||||
|
2026-04-14 21:56:15.340 | INFO | __main__:detect_domain:1137 - 开始检测域名: bitcoinmarketingexpert.com
|
||||||
|
2026-04-14 21:56:15.341 | INFO | __main__:start_detection:1625 - 当前实际线程数量: 1/1
|
||||||
|
2026-04-14 21:56:15.341 | DEBUG | __main__:detect_domain:1141 - 线程 15272 使用共享敏感词,共 430 个敏感词
|
||||||
|
2026-04-14 21:56:15.342 | INFO | __main__:detect_domain:1357 - 检测聚查备案: bitcoinmarketingexpert.com
|
||||||
|
2026-04-14 21:56:15.679 | INFO | __main__:detect_domain:1364 - 备案查询结果: True, 查询成功, ('', '', '', '未备案')
|
||||||
|
2026-04-14 21:56:15.687 | DEBUG | app.utils.database:connect:140 - 线程 15272 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:15.705 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:15.705 | INFO | __main__:detect_domain:1380 - 聚查备案检测完成: bitcoinmarketingexpert.com
|
||||||
|
2026-04-14 21:56:15.723 | DEBUG | app.utils.database:connect:140 - 线程 15272 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:15.740 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:15.756 | DEBUG | app.utils.database:connect:140 - 线程 15272 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:15.764 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:15.764 | INFO | __main__:detect_domain:1489 - 域名检测完成: bitcoinmarketingexpert.com
|
||||||
|
2026-04-14 21:56:15.776 | DEBUG | __main__:start_detection:1605 - 创建线程 10 成功,域名: bitcoinprosummit.com
|
||||||
|
2026-04-14 21:56:15.776 | INFO | __main__:detect_domain:1129 - 线程 6120 开始检测域名: bitcoinprosummit.com
|
||||||
|
2026-04-14 21:56:15.776 | DEBUG | __main__:start_detection:1615 - 启动线程 10 成功,域名: bitcoinprosummit.com
|
||||||
|
2026-04-14 21:56:15.776 | INFO | __main__:detect_domain:1137 - 开始检测域名: bitcoinprosummit.com
|
||||||
|
2026-04-14 21:56:15.776 | INFO | __main__:start_detection:1625 - 当前实际线程数量: 1/1
|
||||||
|
2026-04-14 21:56:15.777 | DEBUG | __main__:detect_domain:1141 - 线程 6120 使用共享敏感词,共 430 个敏感词
|
||||||
|
2026-04-14 21:56:15.778 | INFO | __main__:detect_domain:1357 - 检测聚查备案: bitcoinprosummit.com
|
||||||
|
2026-04-14 21:56:15.801 | INFO | __main__:stop:1915 - 停止域名检测端
|
||||||
|
2026-04-14 21:56:18.689 | INFO | __main__:detect_domain:1364 - 备案查询结果: True, 查询成功, ('', '', '', '未备案')
|
||||||
|
2026-04-14 21:56:18.698 | DEBUG | app.utils.database:connect:140 - 线程 6120 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:18.715 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:18.715 | INFO | __main__:detect_domain:1380 - 聚查备案检测完成: bitcoinprosummit.com
|
||||||
|
2026-04-14 21:56:18.732 | DEBUG | app.utils.database:connect:140 - 线程 6120 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:18.750 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:18.766 | DEBUG | app.utils.database:connect:140 - 线程 6120 从连接池获取连接成功
|
||||||
|
2026-04-14 21:56:18.775 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-14 21:56:18.775 | INFO | __main__:detect_domain:1489 - 域名检测完成: bitcoinprosummit.com
|
||||||
|
2026-04-14 21:56:18.835 | DEBUG | __main__:start_detection:1605 - 创建线程 11 成功,域名: bitcoinstacksu.com
|
||||||
|
2026-04-14 21:56:18.836 | INFO | __main__:detect_domain:1129 - 线程 18760 开始检测域名: bitcoinstacksu.com
|
||||||
|
2026-04-14 21:56:18.836 | DEBUG | __main__:start_detection:1615 - 启动线程 11 成功,域名: bitcoinstacksu.com
|
||||||
|
2026-04-14 21:56:18.836 | INFO | __main__:detect_domain:1134 - 检测已停止,跳过域名: bitcoinstacksu.com
|
||||||
|
2026-04-14 21:56:18.836 | INFO | __main__:start_detection:1625 - 当前实际线程数量: 1/1
|
||||||
|
2026-04-14 21:56:18.837 | INFO | __main__:start_detection:1577 - 检测已停止,停止创建新线程
|
||||||
|
2026-04-14 21:56:18.837 | INFO | __main__:start_detection:1642 - 等待剩余 2 个线程完成
|
||||||
|
2026-04-14 21:56:18.837 | INFO | __main__:start_detection:1646 - 检测已停止,停止等待线程完成
|
||||||
|
2026-04-14 21:56:18.839 | INFO | __main__:start_detection:1690 - 当前批次检测完成,累计处理 1000 个域名
|
||||||
|
2026-04-14 21:56:18.840 | INFO | __main__:start_detection:1702 - 域名检测任务完成
|
||||||
|
2026-04-14 21:56:23.312 | DEBUG | __main__:start_redis_subscription:1907 - Redis订阅失败: Timeout reading from socket
|
||||||
|
2026-04-14 21:56:23.312 | DEBUG | __main__:start_redis_subscription:1908 - 3秒后尝试重新连接...
|
||||||
|
2026-04-14 22:06:22.227 | INFO | __main__:<module>:1937 - 应用程序运行结束
|
||||||
|
2026-04-14 22:06:22.227 | INFO | __main__:<module>:1941 - 停止检测端
|
||||||
|
2026-04-14 22:06:22.228 | INFO | __main__:stop:1915 - 停止域名检测端
|
||||||
349
detect_worker.2026-04-17_10-05-10_184895.log
Normal file
349
detect_worker.2026-04-17_10-05-10_184895.log
Normal file
@@ -0,0 +1,349 @@
|
|||||||
|
2026-04-17 10:05:10.183 | INFO | __main__:<module>:1926 - 程序开始运行
|
||||||
|
2026-04-17 10:05:10.193 | INFO | __main__:<module>:1930 - 创建应用程序成功
|
||||||
|
2026-04-17 10:05:10.194 | INFO | __main__:__init__:66 - 当前文件路径: G:\PyCode\domainScanDemo\detect_worker.py
|
||||||
|
2026-04-17 10:05:10.194 | INFO | __main__:__init__:67 - 当前目录: G:\PyCode\domainScanDemo
|
||||||
|
2026-04-17 10:05:10.194 | INFO | __main__:__init__:77 - 开发环境目录: G:\
|
||||||
|
2026-04-17 10:05:10.194 | INFO | __main__:__init__:81 - SVG图标路径: G:\new_logo.svg
|
||||||
|
2026-04-17 10:05:10.194 | WARNING | __main__:__init__:95 - SVG图标文件不存在: G:\new_logo.svg
|
||||||
|
2026-04-17 10:05:10.194 | INFO | __main__:__init__:99 - ICO图标路径: G:\favicon2.ico
|
||||||
|
2026-04-17 10:05:10.194 | WARNING | __main__:__init__:113 - ICO图标文件不存在: G:\favicon2.ico
|
||||||
|
2026-04-17 10:05:15.765 | INFO | app.utils.database:_init_connection_pool:84 - 数据库连接池初始化成功,大小: 100
|
||||||
|
2026-04-17 10:05:15.810 | INFO | app.utils.database:__init__:59 - Redis 连接成功: 120.78.93.250:6379
|
||||||
|
2026-04-17 10:05:15.819 | INFO | app.utils.database:_init_bloom_filter:103 - 布隆过滤器已存在,直接使用
|
||||||
|
2026-04-17 10:05:15.866 | INFO | __main__:__init__:724 - Redis 连接成功: 120.78.93.250:6379
|
||||||
|
2026-04-17 10:05:15.876 | INFO | __main__:load_detect_options:800 - 从Redis加载检测选项成功: {'detect_register': False, 'detect_chinaz': False, 'detect_aizhan': False, 'detect_baidu_site': False, 'detect_360_site': False, 'detect_baidu_security': False, 'detect_whois': False, 'detect_beian': True, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}
|
||||||
|
2026-04-17 10:05:15.886 | INFO | __main__:load_proxy_config:854 - 从Redis加载代理配置成功: {'proxy_enable': True, 'proxy_url': 'http://api.ch12361.com/getProxy.php?group=D&count=100'}
|
||||||
|
2026-04-17 10:05:15.895 | INFO | __main__:load_thread_count:910 - 从Redis加载检测线程数成功: 1
|
||||||
|
2026-04-17 10:05:15.915 | DEBUG | app.utils.database:connect:140 - 线程 15376 从连接池获取连接成功
|
||||||
|
2026-04-17 10:05:15.924 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-17 10:05:15.925 | INFO | __main__:__init__:746 - 加载敏感词完成,共 430 个敏感词
|
||||||
|
2026-04-17 10:05:15.935 | INFO | __main__:load_cookies_from_remote:1784 - 从Redis加载聚名cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:15.945 | INFO | __main__:load_cookies_from_remote:1811 - 从Redis加载聚查cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:15.954 | INFO | __main__:load_cookies_from_remote:1838 - 从Redis加载桔子SEO cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:15.954 | INFO | __main__:__init__:769 - 检测端配置信息:
|
||||||
|
2026-04-17 10:05:15.954 | INFO | __main__:__init__:770 - 检测选项: {'detect_register': False, 'detect_chinaz': False, 'detect_aizhan': False, 'detect_baidu_site': False, 'detect_360_site': False, 'detect_baidu_security': False, 'detect_whois': False, 'detect_beian': True, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}
|
||||||
|
2026-04-17 10:05:15.955 | INFO | __main__:__init__:771 - 代理配置: {'proxy_enable': True, 'proxy_url': 'http://api.ch12361.com/getProxy.php?group=D&count=100'}
|
||||||
|
2026-04-17 10:05:15.955 | INFO | __main__:__init__:772 - 检测线程数: 1
|
||||||
|
2026-04-17 10:05:15.955 | DEBUG | __main__:__init__:414 - Redis配置更新订阅已启动
|
||||||
|
2026-04-17 10:05:15.955 | DEBUG | __main__:connect_signals:784 - 信号连接成功
|
||||||
|
2026-04-17 10:05:15.955 | DEBUG | __main__:update_config_labels:1850 - 发送配置更新事件
|
||||||
|
2026-04-17 10:05:15.956 | DEBUG | __main__:update_config_labels:1856 - 配置更新事件已发送
|
||||||
|
2026-04-17 10:05:15.957 | INFO | __main__:<module>:1934 - 创建主窗口成功
|
||||||
|
2026-04-17 10:05:16.164 | INFO | __main__:<module>:1936 - 显示主窗口成功
|
||||||
|
2026-04-17 10:05:16.165 | INFO | __main__:<module>:1939 - 开始运行应用程序
|
||||||
|
2026-04-17 10:05:16.165 | DEBUG | __main__:update_config_labels:593 - 开始更新GUI配置标签
|
||||||
|
2026-04-17 10:05:16.166 | DEBUG | __main__:update_config_labels:597 - worker对象存在,当前配置: {'detect_register': False, 'detect_chinaz': False, 'detect_aizhan': False, 'detect_baidu_site': False, 'detect_360_site': False, 'detect_baidu_security': False, 'detect_whois': False, 'detect_beian': True, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}, {'proxy_enable': True, 'proxy_url': 'http://api.ch12361.com/getProxy.php?group=D&count=100'}, 1
|
||||||
|
2026-04-17 10:05:16.166 | DEBUG | __main__:update_config_labels:635 - 准备更新标签: 检测选项: 8.聚查中的备案相关查询, 代理配置: 启用: 是, URL: http://api.ch12361.com/getProxy.php?group=D&count=100, 检测线程数: 1
|
||||||
|
2026-04-17 10:05:16.166 | DEBUG | __main__:update_config_labels:660 - GUI配置标签更新完成
|
||||||
|
2026-04-17 10:05:16.193 | DEBUG | __main__:start_redis_subscription:1888 - 开始监听配置更新...
|
||||||
|
2026-04-17 10:05:34.661 | DEBUG | __main__:start_redis_subscription:1897 - 收到配置更新消息: detect_options
|
||||||
|
2026-04-17 10:05:34.671 | INFO | __main__:load_detect_options:800 - 从Redis加载检测选项成功: {'detect_register': False, 'detect_chinaz': False, 'detect_aizhan': False, 'detect_baidu_site': False, 'detect_360_site': False, 'detect_baidu_security': False, 'detect_whois': False, 'detect_beian': False, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}
|
||||||
|
2026-04-17 10:05:34.683 | INFO | __main__:load_proxy_config:854 - 从Redis加载代理配置成功: {'proxy_enable': True, 'proxy_url': 'http://api.ch12361.com/getProxy.php?group=D&count=100'}
|
||||||
|
2026-04-17 10:05:34.692 | INFO | __main__:load_thread_count:910 - 从Redis加载检测线程数成功: 1
|
||||||
|
2026-04-17 10:05:34.701 | INFO | __main__:load_cookies_from_remote:1784 - 从Redis加载聚名cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:34.711 | INFO | __main__:load_cookies_from_remote:1811 - 从Redis加载聚查cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:34.722 | INFO | __main__:load_cookies_from_remote:1838 - 从Redis加载桔子SEO cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:34.723 | DEBUG | __main__:update_config_labels:1850 - 发送配置更新事件
|
||||||
|
2026-04-17 10:05:34.723 | DEBUG | __main__:update_config_labels:1856 - 配置更新事件已发送
|
||||||
|
2026-04-17 10:05:34.723 | DEBUG | __main__:start_redis_subscription:1909 - 配置已更新
|
||||||
|
2026-04-17 10:05:34.723 | DEBUG | __main__:update_config_labels:593 - 开始更新GUI配置标签
|
||||||
|
2026-04-17 10:05:34.723 | DEBUG | __main__:update_config_labels:597 - worker对象存在,当前配置: {'detect_register': False, 'detect_chinaz': False, 'detect_aizhan': False, 'detect_baidu_site': False, 'detect_360_site': False, 'detect_baidu_security': False, 'detect_whois': False, 'detect_beian': False, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}, {'proxy_enable': True, 'proxy_url': 'http://api.ch12361.com/getProxy.php?group=D&count=100'}, 1
|
||||||
|
2026-04-17 10:05:34.723 | DEBUG | __main__:update_config_labels:635 - 准备更新标签: 检测选项: 无, 代理配置: 启用: 是, URL: http://api.ch12361.com/getProxy.php?group=D&count=100, 检测线程数: 1
|
||||||
|
2026-04-17 10:05:34.723 | DEBUG | __main__:update_config_labels:660 - GUI配置标签更新完成
|
||||||
|
2026-04-17 10:05:36.893 | DEBUG | __main__:start_redis_subscription:1897 - 收到配置更新消息: detect_options
|
||||||
|
2026-04-17 10:05:36.902 | INFO | __main__:load_detect_options:800 - 从Redis加载检测选项成功: {'detect_register': True, 'detect_chinaz': False, 'detect_aizhan': False, 'detect_baidu_site': False, 'detect_360_site': False, 'detect_baidu_security': False, 'detect_whois': False, 'detect_beian': False, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}
|
||||||
|
2026-04-17 10:05:36.912 | INFO | __main__:load_proxy_config:854 - 从Redis加载代理配置成功: {'proxy_enable': True, 'proxy_url': 'http://api.ch12361.com/getProxy.php?group=D&count=100'}
|
||||||
|
2026-04-17 10:05:36.921 | INFO | __main__:load_thread_count:910 - 从Redis加载检测线程数成功: 1
|
||||||
|
2026-04-17 10:05:36.931 | INFO | __main__:load_cookies_from_remote:1784 - 从Redis加载聚名cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:36.940 | INFO | __main__:load_cookies_from_remote:1811 - 从Redis加载聚查cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:36.950 | INFO | __main__:load_cookies_from_remote:1838 - 从Redis加载桔子SEO cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:36.950 | DEBUG | __main__:update_config_labels:1850 - 发送配置更新事件
|
||||||
|
2026-04-17 10:05:36.950 | DEBUG | __main__:update_config_labels:1856 - 配置更新事件已发送
|
||||||
|
2026-04-17 10:05:36.950 | DEBUG | __main__:start_redis_subscription:1909 - 配置已更新
|
||||||
|
2026-04-17 10:05:36.950 | DEBUG | __main__:update_config_labels:593 - 开始更新GUI配置标签
|
||||||
|
2026-04-17 10:05:36.950 | DEBUG | __main__:update_config_labels:597 - worker对象存在,当前配置: {'detect_register': True, 'detect_chinaz': False, 'detect_aizhan': False, 'detect_baidu_site': False, 'detect_360_site': False, 'detect_baidu_security': False, 'detect_whois': False, 'detect_beian': False, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}, {'proxy_enable': True, 'proxy_url': 'http://api.ch12361.com/getProxy.php?group=D&count=100'}, 1
|
||||||
|
2026-04-17 10:05:36.950 | DEBUG | __main__:update_config_labels:635 - 准备更新标签: 检测选项: 1.检测注册, 代理配置: 启用: 是, URL: http://api.ch12361.com/getProxy.php?group=D&count=100, 检测线程数: 1
|
||||||
|
2026-04-17 10:05:36.950 | DEBUG | __main__:update_config_labels:660 - GUI配置标签更新完成
|
||||||
|
2026-04-17 10:05:37.377 | DEBUG | __main__:start_redis_subscription:1897 - 收到配置更新消息: detect_options
|
||||||
|
2026-04-17 10:05:37.386 | INFO | __main__:load_detect_options:800 - 从Redis加载检测选项成功: {'detect_register': True, 'detect_chinaz': True, 'detect_aizhan': False, 'detect_baidu_site': False, 'detect_360_site': False, 'detect_baidu_security': False, 'detect_whois': False, 'detect_beian': False, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}
|
||||||
|
2026-04-17 10:05:37.396 | INFO | __main__:load_proxy_config:854 - 从Redis加载代理配置成功: {'proxy_enable': True, 'proxy_url': 'http://api.ch12361.com/getProxy.php?group=D&count=100'}
|
||||||
|
2026-04-17 10:05:37.405 | INFO | __main__:load_thread_count:910 - 从Redis加载检测线程数成功: 1
|
||||||
|
2026-04-17 10:05:37.415 | INFO | __main__:load_cookies_from_remote:1784 - 从Redis加载聚名cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:37.424 | INFO | __main__:load_cookies_from_remote:1811 - 从Redis加载聚查cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:37.432 | INFO | __main__:load_cookies_from_remote:1838 - 从Redis加载桔子SEO cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:37.433 | DEBUG | __main__:update_config_labels:1850 - 发送配置更新事件
|
||||||
|
2026-04-17 10:05:37.433 | DEBUG | __main__:update_config_labels:1856 - 配置更新事件已发送
|
||||||
|
2026-04-17 10:05:37.433 | DEBUG | __main__:start_redis_subscription:1909 - 配置已更新
|
||||||
|
2026-04-17 10:05:37.434 | DEBUG | __main__:update_config_labels:593 - 开始更新GUI配置标签
|
||||||
|
2026-04-17 10:05:37.434 | DEBUG | __main__:update_config_labels:597 - worker对象存在,当前配置: {'detect_register': True, 'detect_chinaz': True, 'detect_aizhan': False, 'detect_baidu_site': False, 'detect_360_site': False, 'detect_baidu_security': False, 'detect_whois': False, 'detect_beian': False, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}, {'proxy_enable': True, 'proxy_url': 'http://api.ch12361.com/getProxy.php?group=D&count=100'}, 1
|
||||||
|
2026-04-17 10:05:37.434 | DEBUG | __main__:update_config_labels:635 - 准备更新标签: 检测选项: 1.检测注册 | 2.站长之家查询, 代理配置: 启用: 是, URL: http://api.ch12361.com/getProxy.php?group=D&count=100, 检测线程数: 1
|
||||||
|
2026-04-17 10:05:37.434 | DEBUG | __main__:update_config_labels:660 - GUI配置标签更新完成
|
||||||
|
2026-04-17 10:05:37.877 | DEBUG | __main__:start_redis_subscription:1897 - 收到配置更新消息: detect_options
|
||||||
|
2026-04-17 10:05:37.887 | INFO | __main__:load_detect_options:800 - 从Redis加载检测选项成功: {'detect_register': True, 'detect_chinaz': True, 'detect_aizhan': True, 'detect_baidu_site': False, 'detect_360_site': False, 'detect_baidu_security': False, 'detect_whois': False, 'detect_beian': False, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}
|
||||||
|
2026-04-17 10:05:37.896 | INFO | __main__:load_proxy_config:854 - 从Redis加载代理配置成功: {'proxy_enable': True, 'proxy_url': 'http://api.ch12361.com/getProxy.php?group=D&count=100'}
|
||||||
|
2026-04-17 10:05:37.906 | INFO | __main__:load_thread_count:910 - 从Redis加载检测线程数成功: 1
|
||||||
|
2026-04-17 10:05:37.916 | INFO | __main__:load_cookies_from_remote:1784 - 从Redis加载聚名cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:37.926 | INFO | __main__:load_cookies_from_remote:1811 - 从Redis加载聚查cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:37.935 | INFO | __main__:load_cookies_from_remote:1838 - 从Redis加载桔子SEO cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:37.935 | DEBUG | __main__:update_config_labels:1850 - 发送配置更新事件
|
||||||
|
2026-04-17 10:05:37.936 | DEBUG | __main__:update_config_labels:1856 - 配置更新事件已发送
|
||||||
|
2026-04-17 10:05:37.936 | DEBUG | __main__:start_redis_subscription:1909 - 配置已更新
|
||||||
|
2026-04-17 10:05:37.936 | DEBUG | __main__:update_config_labels:593 - 开始更新GUI配置标签
|
||||||
|
2026-04-17 10:05:37.936 | DEBUG | __main__:update_config_labels:597 - worker对象存在,当前配置: {'detect_register': True, 'detect_chinaz': True, 'detect_aizhan': True, 'detect_baidu_site': False, 'detect_360_site': False, 'detect_baidu_security': False, 'detect_whois': False, 'detect_beian': False, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}, {'proxy_enable': True, 'proxy_url': 'http://api.ch12361.com/getProxy.php?group=D&count=100'}, 1
|
||||||
|
2026-04-17 10:05:37.936 | DEBUG | __main__:update_config_labels:635 - 准备更新标签: 检测选项: 1.检测注册 | 2.站长之家查询 | 3.爱站网查询, 代理配置: 启用: 是, URL: http://api.ch12361.com/getProxy.php?group=D&count=100, 检测线程数: 1
|
||||||
|
2026-04-17 10:05:37.936 | DEBUG | __main__:update_config_labels:660 - GUI配置标签更新完成
|
||||||
|
2026-04-17 10:05:38.357 | DEBUG | __main__:start_redis_subscription:1897 - 收到配置更新消息: detect_options
|
||||||
|
2026-04-17 10:05:38.367 | INFO | __main__:load_detect_options:800 - 从Redis加载检测选项成功: {'detect_register': True, 'detect_chinaz': True, 'detect_aizhan': True, 'detect_baidu_site': True, 'detect_360_site': False, 'detect_baidu_security': False, 'detect_whois': False, 'detect_beian': False, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}
|
||||||
|
2026-04-17 10:05:38.375 | INFO | __main__:load_proxy_config:854 - 从Redis加载代理配置成功: {'proxy_enable': True, 'proxy_url': 'http://api.ch12361.com/getProxy.php?group=D&count=100'}
|
||||||
|
2026-04-17 10:05:38.385 | INFO | __main__:load_thread_count:910 - 从Redis加载检测线程数成功: 1
|
||||||
|
2026-04-17 10:05:38.395 | INFO | __main__:load_cookies_from_remote:1784 - 从Redis加载聚名cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:38.404 | INFO | __main__:load_cookies_from_remote:1811 - 从Redis加载聚查cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:38.413 | INFO | __main__:load_cookies_from_remote:1838 - 从Redis加载桔子SEO cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:38.413 | DEBUG | __main__:update_config_labels:1850 - 发送配置更新事件
|
||||||
|
2026-04-17 10:05:38.413 | DEBUG | __main__:update_config_labels:1856 - 配置更新事件已发送
|
||||||
|
2026-04-17 10:05:38.413 | DEBUG | __main__:start_redis_subscription:1909 - 配置已更新
|
||||||
|
2026-04-17 10:05:38.413 | DEBUG | __main__:update_config_labels:593 - 开始更新GUI配置标签
|
||||||
|
2026-04-17 10:05:38.413 | DEBUG | __main__:update_config_labels:597 - worker对象存在,当前配置: {'detect_register': True, 'detect_chinaz': True, 'detect_aizhan': True, 'detect_baidu_site': True, 'detect_360_site': False, 'detect_baidu_security': False, 'detect_whois': False, 'detect_beian': False, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}, {'proxy_enable': True, 'proxy_url': 'http://api.ch12361.com/getProxy.php?group=D&count=100'}, 1
|
||||||
|
2026-04-17 10:05:38.413 | DEBUG | __main__:update_config_labels:635 - 准备更新标签: 检测选项: 1.检测注册 | 2.站长之家查询 | 3.爱站网查询 | 4.百度site查询, 代理配置: 启用: 是, URL: http://api.ch12361.com/getProxy.php?group=D&count=100, 检测线程数: 1
|
||||||
|
2026-04-17 10:05:38.413 | DEBUG | __main__:update_config_labels:660 - GUI配置标签更新完成
|
||||||
|
2026-04-17 10:05:38.746 | DEBUG | __main__:start_redis_subscription:1897 - 收到配置更新消息: detect_options
|
||||||
|
2026-04-17 10:05:38.755 | INFO | __main__:load_detect_options:800 - 从Redis加载检测选项成功: {'detect_register': True, 'detect_chinaz': True, 'detect_aizhan': True, 'detect_baidu_site': True, 'detect_360_site': True, 'detect_baidu_security': False, 'detect_whois': False, 'detect_beian': False, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}
|
||||||
|
2026-04-17 10:05:38.764 | INFO | __main__:load_proxy_config:854 - 从Redis加载代理配置成功: {'proxy_enable': True, 'proxy_url': 'http://api.ch12361.com/getProxy.php?group=D&count=100'}
|
||||||
|
2026-04-17 10:05:38.773 | INFO | __main__:load_thread_count:910 - 从Redis加载检测线程数成功: 1
|
||||||
|
2026-04-17 10:05:38.784 | INFO | __main__:load_cookies_from_remote:1784 - 从Redis加载聚名cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:38.795 | INFO | __main__:load_cookies_from_remote:1811 - 从Redis加载聚查cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:38.805 | INFO | __main__:load_cookies_from_remote:1838 - 从Redis加载桔子SEO cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:38.805 | DEBUG | __main__:update_config_labels:1850 - 发送配置更新事件
|
||||||
|
2026-04-17 10:05:38.805 | DEBUG | __main__:update_config_labels:1856 - 配置更新事件已发送
|
||||||
|
2026-04-17 10:05:38.805 | DEBUG | __main__:start_redis_subscription:1909 - 配置已更新
|
||||||
|
2026-04-17 10:05:38.805 | DEBUG | __main__:update_config_labels:593 - 开始更新GUI配置标签
|
||||||
|
2026-04-17 10:05:38.805 | DEBUG | __main__:update_config_labels:597 - worker对象存在,当前配置: {'detect_register': True, 'detect_chinaz': True, 'detect_aizhan': True, 'detect_baidu_site': True, 'detect_360_site': True, 'detect_baidu_security': False, 'detect_whois': False, 'detect_beian': False, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}, {'proxy_enable': True, 'proxy_url': 'http://api.ch12361.com/getProxy.php?group=D&count=100'}, 1
|
||||||
|
2026-04-17 10:05:38.805 | DEBUG | __main__:update_config_labels:635 - 准备更新标签: 检测选项: 1.检测注册 | 2.站长之家查询 | 3.爱站网查询 | 4.百度site查询 | 5.360的site查询, 代理配置: 启用: 是, URL: http://api.ch12361.com/getProxy.php?group=D&count=100, 检测线程数: 1
|
||||||
|
2026-04-17 10:05:38.805 | DEBUG | __main__:update_config_labels:660 - GUI配置标签更新完成
|
||||||
|
2026-04-17 10:05:41.658 | DEBUG | __main__:start_redis_subscription:1897 - 收到配置更新消息: detect_options
|
||||||
|
2026-04-17 10:05:41.666 | INFO | __main__:load_detect_options:800 - 从Redis加载检测选项成功: {'detect_register': True, 'detect_chinaz': True, 'detect_aizhan': True, 'detect_baidu_site': True, 'detect_360_site': True, 'detect_baidu_security': True, 'detect_whois': False, 'detect_beian': False, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}
|
||||||
|
2026-04-17 10:05:41.676 | INFO | __main__:load_proxy_config:854 - 从Redis加载代理配置成功: {'proxy_enable': True, 'proxy_url': 'http://api.ch12361.com/getProxy.php?group=D&count=100'}
|
||||||
|
2026-04-17 10:05:41.685 | INFO | __main__:load_thread_count:910 - 从Redis加载检测线程数成功: 1
|
||||||
|
2026-04-17 10:05:41.695 | INFO | __main__:load_cookies_from_remote:1784 - 从Redis加载聚名cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:41.705 | INFO | __main__:load_cookies_from_remote:1811 - 从Redis加载聚查cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:41.714 | INFO | __main__:load_cookies_from_remote:1838 - 从Redis加载桔子SEO cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:41.714 | DEBUG | __main__:update_config_labels:1850 - 发送配置更新事件
|
||||||
|
2026-04-17 10:05:41.714 | DEBUG | __main__:update_config_labels:1856 - 配置更新事件已发送
|
||||||
|
2026-04-17 10:05:41.714 | DEBUG | __main__:start_redis_subscription:1909 - 配置已更新
|
||||||
|
2026-04-17 10:05:41.714 | DEBUG | __main__:update_config_labels:593 - 开始更新GUI配置标签
|
||||||
|
2026-04-17 10:05:41.714 | DEBUG | __main__:update_config_labels:597 - worker对象存在,当前配置: {'detect_register': True, 'detect_chinaz': True, 'detect_aizhan': True, 'detect_baidu_site': True, 'detect_360_site': True, 'detect_baidu_security': True, 'detect_whois': False, 'detect_beian': False, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}, {'proxy_enable': True, 'proxy_url': 'http://api.ch12361.com/getProxy.php?group=D&count=100'}, 1
|
||||||
|
2026-04-17 10:05:41.714 | DEBUG | __main__:update_config_labels:635 - 准备更新标签: 检测选项: 1.检测注册 | 2.站长之家查询 | 3.爱站网查询 | 4.百度site查询 | 5.360的site查询 | 6.百度网页安全中心查询, 代理配置: 启用: 是, URL: http://api.ch12361.com/getProxy.php?group=D&count=100, 检测线程数: 1
|
||||||
|
2026-04-17 10:05:41.714 | DEBUG | __main__:update_config_labels:660 - GUI配置标签更新完成
|
||||||
|
2026-04-17 10:05:44.825 | DEBUG | __main__:start_redis_subscription:1897 - 收到配置更新消息: proxy_config
|
||||||
|
2026-04-17 10:05:44.835 | INFO | __main__:load_detect_options:800 - 从Redis加载检测选项成功: {'detect_register': True, 'detect_chinaz': True, 'detect_aizhan': True, 'detect_baidu_site': True, 'detect_360_site': True, 'detect_baidu_security': True, 'detect_whois': False, 'detect_beian': False, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}
|
||||||
|
2026-04-17 10:05:44.845 | INFO | __main__:load_proxy_config:854 - 从Redis加载代理配置成功: {'proxy_enable': True, 'proxy_url': ''}
|
||||||
|
2026-04-17 10:05:44.853 | INFO | __main__:load_thread_count:910 - 从Redis加载检测线程数成功: 1
|
||||||
|
2026-04-17 10:05:44.863 | INFO | __main__:load_cookies_from_remote:1784 - 从Redis加载聚名cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:44.873 | INFO | __main__:load_cookies_from_remote:1811 - 从Redis加载聚查cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:44.884 | INFO | __main__:load_cookies_from_remote:1838 - 从Redis加载桔子SEO cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:44.884 | DEBUG | __main__:update_config_labels:1850 - 发送配置更新事件
|
||||||
|
2026-04-17 10:05:44.884 | DEBUG | __main__:update_config_labels:1856 - 配置更新事件已发送
|
||||||
|
2026-04-17 10:05:44.884 | DEBUG | __main__:start_redis_subscription:1909 - 配置已更新
|
||||||
|
2026-04-17 10:05:44.884 | DEBUG | __main__:update_config_labels:593 - 开始更新GUI配置标签
|
||||||
|
2026-04-17 10:05:44.884 | DEBUG | __main__:update_config_labels:597 - worker对象存在,当前配置: {'detect_register': True, 'detect_chinaz': True, 'detect_aizhan': True, 'detect_baidu_site': True, 'detect_360_site': True, 'detect_baidu_security': True, 'detect_whois': False, 'detect_beian': False, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}, {'proxy_enable': True, 'proxy_url': ''}, 1
|
||||||
|
2026-04-17 10:05:44.884 | DEBUG | __main__:update_config_labels:635 - 准备更新标签: 检测选项: 1.检测注册 | 2.站长之家查询 | 3.爱站网查询 | 4.百度site查询 | 5.360的site查询 | 6.百度网页安全中心查询, 代理配置: 启用: 是, 检测线程数: 1
|
||||||
|
2026-04-17 10:05:44.884 | DEBUG | __main__:update_config_labels:660 - GUI配置标签更新完成
|
||||||
|
2026-04-17 10:05:45.259 | DEBUG | __main__:start_redis_subscription:1897 - 收到配置更新消息: proxy_config
|
||||||
|
2026-04-17 10:05:45.268 | INFO | __main__:load_detect_options:800 - 从Redis加载检测选项成功: {'detect_register': True, 'detect_chinaz': True, 'detect_aizhan': True, 'detect_baidu_site': True, 'detect_360_site': True, 'detect_baidu_security': True, 'detect_whois': False, 'detect_beian': False, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}
|
||||||
|
2026-04-17 10:05:45.281 | INFO | __main__:load_proxy_config:854 - 从Redis加载代理配置成功: {'proxy_enable': False, 'proxy_url': ''}
|
||||||
|
2026-04-17 10:05:45.289 | INFO | __main__:load_thread_count:910 - 从Redis加载检测线程数成功: 1
|
||||||
|
2026-04-17 10:05:45.299 | INFO | __main__:load_cookies_from_remote:1784 - 从Redis加载聚名cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:45.309 | INFO | __main__:load_cookies_from_remote:1811 - 从Redis加载聚查cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:45.318 | INFO | __main__:load_cookies_from_remote:1838 - 从Redis加载桔子SEO cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:45.318 | DEBUG | __main__:update_config_labels:1850 - 发送配置更新事件
|
||||||
|
2026-04-17 10:05:45.319 | DEBUG | __main__:update_config_labels:1856 - 配置更新事件已发送
|
||||||
|
2026-04-17 10:05:45.319 | DEBUG | __main__:start_redis_subscription:1909 - 配置已更新
|
||||||
|
2026-04-17 10:05:45.319 | DEBUG | __main__:update_config_labels:593 - 开始更新GUI配置标签
|
||||||
|
2026-04-17 10:05:45.319 | DEBUG | __main__:update_config_labels:597 - worker对象存在,当前配置: {'detect_register': True, 'detect_chinaz': True, 'detect_aizhan': True, 'detect_baidu_site': True, 'detect_360_site': True, 'detect_baidu_security': True, 'detect_whois': False, 'detect_beian': False, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}, {'proxy_enable': False, 'proxy_url': ''}, 1
|
||||||
|
2026-04-17 10:05:45.319 | DEBUG | __main__:update_config_labels:635 - 准备更新标签: 检测选项: 1.检测注册 | 2.站长之家查询 | 3.爱站网查询 | 4.百度site查询 | 5.360的site查询 | 6.百度网页安全中心查询, 代理配置: 启用: 否, 检测线程数: 1
|
||||||
|
2026-04-17 10:05:45.319 | DEBUG | __main__:update_config_labels:660 - GUI配置标签更新完成
|
||||||
|
2026-04-17 10:05:52.571 | INFO | __main__:start_detection:1504 - 开始执行域名检测任务
|
||||||
|
2026-04-17 10:05:52.583 | INFO | __main__:load_detect_options:800 - 从Redis加载检测选项成功: {'detect_register': True, 'detect_chinaz': True, 'detect_aizhan': True, 'detect_baidu_site': True, 'detect_360_site': True, 'detect_baidu_security': True, 'detect_whois': False, 'detect_beian': False, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}
|
||||||
|
2026-04-17 10:05:52.593 | INFO | __main__:load_proxy_config:854 - 从Redis加载代理配置成功: {'proxy_enable': False, 'proxy_url': ''}
|
||||||
|
2026-04-17 10:05:52.602 | INFO | __main__:load_thread_count:910 - 从Redis加载检测线程数成功: 1
|
||||||
|
2026-04-17 10:05:52.602 | INFO | __main__:start_detection:1511 - 检测线程数设置为: 1
|
||||||
|
2026-04-17 10:05:52.611 | INFO | __main__:load_cookies_from_remote:1784 - 从Redis加载聚名cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:52.620 | INFO | __main__:load_cookies_from_remote:1811 - 从Redis加载聚查cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:52.643 | INFO | __main__:load_cookies_from_remote:1838 - 从Redis加载桔子SEO cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:52.652 | INFO | __main__:load_cookies_from_remote:1784 - 从Redis加载聚名cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:52.663 | INFO | __main__:load_cookies_from_remote:1811 - 从Redis加载聚查cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:52.671 | INFO | __main__:load_cookies_from_remote:1838 - 从Redis加载桔子SEO cookies成功并保存到本地
|
||||||
|
2026-04-17 10:05:52.681 | DEBUG | app.utils.database:connect:140 - 线程 18604 从连接池获取连接成功
|
||||||
|
2026-04-17 10:05:52.689 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-17 10:05:52.690 | INFO | __main__:start_detection:1545 - 重新加载敏感词完成,共 430 个敏感词
|
||||||
|
2026-04-17 10:05:52.690 | DEBUG | __main__:update_config_labels:1850 - 发送配置更新事件
|
||||||
|
2026-04-17 10:05:52.690 | DEBUG | __main__:update_config_labels:1856 - 配置更新事件已发送
|
||||||
|
2026-04-17 10:05:52.690 | DEBUG | __main__:update_config_labels:593 - 开始更新GUI配置标签
|
||||||
|
2026-04-17 10:05:52.690 | DEBUG | __main__:update_config_labels:597 - worker对象存在,当前配置: {'detect_register': True, 'detect_chinaz': True, 'detect_aizhan': True, 'detect_baidu_site': True, 'detect_360_site': True, 'detect_baidu_security': True, 'detect_whois': False, 'detect_beian': False, 'detect_intercept': False, 'detect_juziseo': False, 'detect_juziseo_outlink': False}, {'proxy_enable': False, 'proxy_url': ''}, 1
|
||||||
|
2026-04-17 10:05:52.690 | DEBUG | __main__:update_config_labels:635 - 准备更新标签: 检测选项: 1.检测注册 | 2.站长之家查询 | 3.爱站网查询 | 4.百度site查询 | 5.360的site查询 | 6.百度网页安全中心查询, 代理配置: 启用: 否, 检测线程数: 1
|
||||||
|
2026-04-17 10:05:52.690 | DEBUG | __main__:update_config_labels:660 - GUI配置标签更新完成
|
||||||
|
2026-04-17 10:05:52.712 | DEBUG | app.utils.database:connect:140 - 线程 18604 从连接池获取连接成功
|
||||||
|
2026-04-17 10:05:52.754 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-17 10:05:52.754 | INFO | __main__:start_detection:1563 - 获取到 1000 个需要检测的域名
|
||||||
|
2026-04-17 10:05:52.754 | INFO | __main__:start_detection:1577 - 开始创建线程,当前批次域名数: 1000,最大线程数: 1
|
||||||
|
2026-04-17 10:05:52.754 | DEBUG | __main__:start_detection:1609 - 创建线程 1 成功,域名: johnempowers.com
|
||||||
|
2026-04-17 10:05:52.755 | INFO | __main__:detect_domain:1129 - 线程 3724 开始检测域名: johnempowers.com
|
||||||
|
2026-04-17 10:05:52.755 | DEBUG | __main__:start_detection:1619 - 启动线程 1 成功,域名: johnempowers.com
|
||||||
|
2026-04-17 10:05:52.755 | INFO | __main__:detect_domain:1137 - 开始检测域名: johnempowers.com
|
||||||
|
2026-04-17 10:05:52.755 | INFO | __main__:start_detection:1629 - 当前实际线程数量: 1/1
|
||||||
|
2026-04-17 10:05:52.755 | DEBUG | __main__:detect_domain:1141 - 线程 3724 使用共享敏感词,共 430 个敏感词
|
||||||
|
2026-04-17 10:05:52.758 | INFO | __main__:detect_domain:1148 - 检测注册状态: johnempowers.com
|
||||||
|
2026-04-17 10:05:52.758 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-17 10:05:54.278 | DEBUG | app.utils.database:connect:140 - 线程 3724 从连接池获取连接成功
|
||||||
|
2026-04-17 10:05:54.295 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-17 10:05:54.296 | INFO | __main__:detect_domain:1176 - 注册状态检测完成: johnempowers.com, 状态: 2, 过期日期:
|
||||||
|
2026-04-17 10:05:54.296 | INFO | __main__:detect_domain:1192 - 检测站长之家: johnempowers.com
|
||||||
|
2026-04-17 10:05:54.296 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-17 10:05:55.096 | INFO | __main__:detect_domain:1208 - 站长之家检测完成: johnempowers.com
|
||||||
|
2026-04-17 10:05:55.096 | INFO | __main__:detect_domain:1217 - 检测爱站网: johnempowers.com
|
||||||
|
2026-04-17 10:05:55.096 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-17 10:05:55.314 | INFO | __main__:detect_domain:1233 - 爱站网检测完成: johnempowers.com
|
||||||
|
2026-04-17 10:05:55.314 | INFO | __main__:detect_domain:1242 - 检测百度: johnempowers.com
|
||||||
|
2026-04-17 10:05:55.314 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-17 10:05:55.909 | INFO | __main__:detect_domain:1269 - 百度site检测完成: johnempowers.com
|
||||||
|
2026-04-17 10:05:55.909 | INFO | __main__:detect_domain:1298 - 检测360: johnempowers.com
|
||||||
|
2026-04-17 10:05:55.909 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-17 10:05:56.815 | INFO | detect.c360:check_domain:83 - 360搜索结果数量: 0
|
||||||
|
2026-04-17 10:05:56.817 | INFO | __main__:detect_domain:1312 - 360检测完成: johnempowers.com
|
||||||
|
2026-04-17 10:05:56.819 | INFO | __main__:detect_domain:1318 - 检测百度网页安全中心: johnempowers.com
|
||||||
|
2026-04-17 10:05:56.819 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-17 10:05:56.929 | INFO | __main__:detect_domain:1329 - 百度网页安全中心检测完成: johnempowers.com, 状态: 正常
|
||||||
|
2026-04-17 10:05:56.945 | DEBUG | app.utils.database:connect:140 - 线程 3724 从连接池获取连接成功
|
||||||
|
2026-04-17 10:05:56.963 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-17 10:05:56.979 | DEBUG | app.utils.database:connect:140 - 线程 3724 从连接池获取连接成功
|
||||||
|
2026-04-17 10:05:57.004 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-17 10:05:57.020 | DEBUG | app.utils.database:connect:140 - 线程 3724 从连接池获取连接成功
|
||||||
|
2026-04-17 10:05:57.029 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-17 10:05:57.037 | DEBUG | app.utils.database:connect:140 - 线程 3724 从连接池获取连接成功
|
||||||
|
2026-04-17 10:05:57.054 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-17 10:05:57.054 | INFO | __main__:detect_domain:1489 - 域名 johnempowers.com 满足条件,已将人工复核状态设置为待人工复核
|
||||||
|
2026-04-17 10:05:57.055 | INFO | __main__:detect_domain:1493 - 域名检测完成: johnempowers.com
|
||||||
|
2026-04-17 10:05:57.105 | DEBUG | __main__:start_detection:1609 - 创建线程 2 成功,域名: johnjolissaint.com
|
||||||
|
2026-04-17 10:05:57.105 | INFO | __main__:detect_domain:1129 - 线程 17136 开始检测域名: johnjolissaint.com
|
||||||
|
2026-04-17 10:05:57.105 | DEBUG | __main__:start_detection:1619 - 启动线程 2 成功,域名: johnjolissaint.com
|
||||||
|
2026-04-17 10:05:57.105 | INFO | __main__:detect_domain:1137 - 开始检测域名: johnjolissaint.com
|
||||||
|
2026-04-17 10:05:57.106 | INFO | __main__:start_detection:1629 - 当前实际线程数量: 1/1
|
||||||
|
2026-04-17 10:05:57.106 | DEBUG | __main__:detect_domain:1141 - 线程 17136 使用共享敏感词,共 430 个敏感词
|
||||||
|
2026-04-17 10:05:57.108 | INFO | __main__:detect_domain:1148 - 检测注册状态: johnjolissaint.com
|
||||||
|
2026-04-17 10:05:57.108 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-17 10:05:57.700 | DEBUG | app.utils.database:connect:140 - 线程 17136 从连接池获取连接成功
|
||||||
|
2026-04-17 10:05:57.718 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-17 10:05:57.718 | INFO | __main__:detect_domain:1176 - 注册状态检测完成: johnjolissaint.com, 状态: 2, 过期日期:
|
||||||
|
2026-04-17 10:05:57.718 | INFO | __main__:detect_domain:1192 - 检测站长之家: johnjolissaint.com
|
||||||
|
2026-04-17 10:05:57.718 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-17 10:05:58.381 | INFO | __main__:detect_domain:1208 - 站长之家检测完成: johnjolissaint.com
|
||||||
|
2026-04-17 10:05:58.381 | INFO | __main__:detect_domain:1217 - 检测爱站网: johnjolissaint.com
|
||||||
|
2026-04-17 10:05:58.382 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-17 10:05:58.560 | INFO | __main__:detect_domain:1233 - 爱站网检测完成: johnjolissaint.com
|
||||||
|
2026-04-17 10:05:58.561 | INFO | __main__:detect_domain:1242 - 检测百度: johnjolissaint.com
|
||||||
|
2026-04-17 10:05:58.561 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-17 10:05:59.245 | INFO | __main__:detect_domain:1269 - 百度site检测完成: johnjolissaint.com
|
||||||
|
2026-04-17 10:05:59.245 | INFO | __main__:detect_domain:1298 - 检测360: johnjolissaint.com
|
||||||
|
2026-04-17 10:05:59.245 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-17 10:05:59.659 | INFO | detect.c360:check_domain:83 - 360搜索结果数量: 0
|
||||||
|
2026-04-17 10:05:59.660 | INFO | __main__:detect_domain:1312 - 360检测完成: johnjolissaint.com
|
||||||
|
2026-04-17 10:05:59.662 | INFO | __main__:detect_domain:1318 - 检测百度网页安全中心: johnjolissaint.com
|
||||||
|
2026-04-17 10:05:59.662 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-17 10:06:00.376 | INFO | __main__:detect_domain:1329 - 百度网页安全中心检测完成: johnjolissaint.com, 状态: 正常
|
||||||
|
2026-04-17 10:06:00.392 | DEBUG | app.utils.database:connect:140 - 线程 17136 从连接池获取连接成功
|
||||||
|
2026-04-17 10:06:00.409 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-17 10:06:00.426 | DEBUG | app.utils.database:connect:140 - 线程 17136 从连接池获取连接成功
|
||||||
|
2026-04-17 10:06:00.444 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-17 10:06:00.472 | DEBUG | app.utils.database:connect:140 - 线程 17136 从连接池获取连接成功
|
||||||
|
2026-04-17 10:06:00.481 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-17 10:06:00.490 | DEBUG | app.utils.database:connect:140 - 线程 17136 从连接池获取连接成功
|
||||||
|
2026-04-17 10:06:00.507 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-17 10:06:00.507 | INFO | __main__:detect_domain:1489 - 域名 johnjolissaint.com 满足条件,已将人工复核状态设置为待人工复核
|
||||||
|
2026-04-17 10:06:00.507 | INFO | __main__:detect_domain:1493 - 域名检测完成: johnjolissaint.com
|
||||||
|
2026-04-17 10:06:00.582 | DEBUG | __main__:start_detection:1609 - 创建线程 3 成功,域名: johnmichaelgill.com
|
||||||
|
2026-04-17 10:06:00.582 | INFO | __main__:detect_domain:1129 - 线程 17804 开始检测域名: johnmichaelgill.com
|
||||||
|
2026-04-17 10:06:00.582 | DEBUG | __main__:start_detection:1619 - 启动线程 3 成功,域名: johnmichaelgill.com
|
||||||
|
2026-04-17 10:06:00.583 | INFO | __main__:detect_domain:1137 - 开始检测域名: johnmichaelgill.com
|
||||||
|
2026-04-17 10:06:00.583 | INFO | __main__:start_detection:1629 - 当前实际线程数量: 1/1
|
||||||
|
2026-04-17 10:06:00.583 | DEBUG | __main__:detect_domain:1141 - 线程 17804 使用共享敏感词,共 430 个敏感词
|
||||||
|
2026-04-17 10:06:00.584 | INFO | __main__:detect_domain:1148 - 检测注册状态: johnmichaelgill.com
|
||||||
|
2026-04-17 10:06:00.586 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-17 10:06:01.125 | DEBUG | app.utils.database:connect:140 - 线程 17804 从连接池获取连接成功
|
||||||
|
2026-04-17 10:06:01.143 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-17 10:06:01.144 | INFO | __main__:detect_domain:1176 - 注册状态检测完成: johnmichaelgill.com, 状态: 2, 过期日期:
|
||||||
|
2026-04-17 10:06:01.144 | INFO | __main__:detect_domain:1192 - 检测站长之家: johnmichaelgill.com
|
||||||
|
2026-04-17 10:06:01.144 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-17 10:06:01.874 | INFO | __main__:detect_domain:1208 - 站长之家检测完成: johnmichaelgill.com
|
||||||
|
2026-04-17 10:06:01.874 | INFO | __main__:detect_domain:1217 - 检测爱站网: johnmichaelgill.com
|
||||||
|
2026-04-17 10:06:01.874 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-17 10:06:02.119 | INFO | __main__:detect_domain:1233 - 爱站网检测完成: johnmichaelgill.com
|
||||||
|
2026-04-17 10:06:02.119 | INFO | __main__:detect_domain:1242 - 检测百度: johnmichaelgill.com
|
||||||
|
2026-04-17 10:06:02.119 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-17 10:06:02.717 | INFO | __main__:detect_domain:1269 - 百度site检测完成: johnmichaelgill.com
|
||||||
|
2026-04-17 10:06:02.717 | INFO | __main__:detect_domain:1298 - 检测360: johnmichaelgill.com
|
||||||
|
2026-04-17 10:06:02.717 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-17 10:06:03.945 | INFO | detect.c360:check_domain:83 - 360搜索结果数量: 0
|
||||||
|
2026-04-17 10:06:03.946 | INFO | __main__:detect_domain:1312 - 360检测完成: johnmichaelgill.com
|
||||||
|
2026-04-17 10:06:03.948 | INFO | __main__:detect_domain:1318 - 检测百度网页安全中心: johnmichaelgill.com
|
||||||
|
2026-04-17 10:06:03.948 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-17 10:06:04.038 | INFO | __main__:detect_domain:1329 - 百度网页安全中心检测完成: johnmichaelgill.com, 状态: 正常
|
||||||
|
2026-04-17 10:06:04.067 | DEBUG | app.utils.database:connect:140 - 线程 17804 从连接池获取连接成功
|
||||||
|
2026-04-17 10:06:04.090 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-17 10:06:04.107 | DEBUG | app.utils.database:connect:140 - 线程 17804 从连接池获取连接成功
|
||||||
|
2026-04-17 10:06:04.125 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-17 10:06:04.142 | DEBUG | app.utils.database:connect:140 - 线程 17804 从连接池获取连接成功
|
||||||
|
2026-04-17 10:06:04.151 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-17 10:06:04.159 | DEBUG | app.utils.database:connect:140 - 线程 17804 从连接池获取连接成功
|
||||||
|
2026-04-17 10:06:04.177 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-17 10:06:04.178 | INFO | __main__:detect_domain:1489 - 域名 johnmichaelgill.com 满足条件,已将人工复核状态设置为待人工复核
|
||||||
|
2026-04-17 10:06:04.178 | INFO | __main__:detect_domain:1493 - 域名检测完成: johnmichaelgill.com
|
||||||
|
2026-04-17 10:06:04.269 | DEBUG | __main__:start_detection:1609 - 创建线程 4 成功,域名: johnnasjourney.com
|
||||||
|
2026-04-17 10:06:04.269 | INFO | __main__:detect_domain:1129 - 线程 864 开始检测域名: johnnasjourney.com
|
||||||
|
2026-04-17 10:06:04.269 | DEBUG | __main__:start_detection:1619 - 启动线程 4 成功,域名: johnnasjourney.com
|
||||||
|
2026-04-17 10:06:04.269 | INFO | __main__:detect_domain:1137 - 开始检测域名: johnnasjourney.com
|
||||||
|
2026-04-17 10:06:04.270 | INFO | __main__:start_detection:1629 - 当前实际线程数量: 1/1
|
||||||
|
2026-04-17 10:06:04.270 | DEBUG | __main__:detect_domain:1141 - 线程 864 使用共享敏感词,共 430 个敏感词
|
||||||
|
2026-04-17 10:06:04.270 | INFO | __main__:detect_domain:1148 - 检测注册状态: johnnasjourney.com
|
||||||
|
2026-04-17 10:06:04.271 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-17 10:06:04.865 | DEBUG | app.utils.database:connect:140 - 线程 864 从连接池获取连接成功
|
||||||
|
2026-04-17 10:06:04.883 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-17 10:06:04.883 | INFO | __main__:detect_domain:1176 - 注册状态检测完成: johnnasjourney.com, 状态: 2, 过期日期:
|
||||||
|
2026-04-17 10:06:04.883 | INFO | __main__:detect_domain:1192 - 检测站长之家: johnnasjourney.com
|
||||||
|
2026-04-17 10:06:04.883 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-17 10:06:05.565 | INFO | __main__:detect_domain:1208 - 站长之家检测完成: johnnasjourney.com
|
||||||
|
2026-04-17 10:06:05.565 | INFO | __main__:detect_domain:1217 - 检测爱站网: johnnasjourney.com
|
||||||
|
2026-04-17 10:06:05.565 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-17 10:06:06.282 | INFO | __main__:stop:1919 - 停止域名检测端
|
||||||
|
2026-04-17 10:06:06.773 | INFO | __main__:detect_domain:1233 - 爱站网检测完成: johnnasjourney.com
|
||||||
|
2026-04-17 10:06:06.773 | INFO | __main__:detect_domain:1242 - 检测百度: johnnasjourney.com
|
||||||
|
2026-04-17 10:06:06.773 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-17 10:06:07.294 | INFO | __main__:detect_domain:1269 - 百度site检测完成: johnnasjourney.com
|
||||||
|
2026-04-17 10:06:07.294 | INFO | __main__:detect_domain:1298 - 检测360: johnnasjourney.com
|
||||||
|
2026-04-17 10:06:07.294 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-17 10:06:08.276 | INFO | detect.c360:check_domain:83 - 360搜索结果数量: 0
|
||||||
|
2026-04-17 10:06:08.278 | INFO | __main__:detect_domain:1312 - 360检测完成: johnnasjourney.com
|
||||||
|
2026-04-17 10:06:08.280 | INFO | __main__:detect_domain:1318 - 检测百度网页安全中心: johnnasjourney.com
|
||||||
|
2026-04-17 10:06:08.280 | INFO | __main__:get_proxies:1114 - 未使用代理,使用直接连接
|
||||||
|
2026-04-17 10:06:08.526 | INFO | __main__:detect_domain:1329 - 百度网页安全中心检测完成: johnnasjourney.com, 状态: 正常
|
||||||
|
2026-04-17 10:06:08.542 | DEBUG | app.utils.database:connect:140 - 线程 864 从连接池获取连接成功
|
||||||
|
2026-04-17 10:06:08.560 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-17 10:06:08.577 | DEBUG | app.utils.database:connect:140 - 线程 864 从连接池获取连接成功
|
||||||
|
2026-04-17 10:06:08.596 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-17 10:06:08.611 | DEBUG | app.utils.database:connect:140 - 线程 864 从连接池获取连接成功
|
||||||
|
2026-04-17 10:06:08.620 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-17 10:06:08.628 | DEBUG | app.utils.database:connect:140 - 线程 864 从连接池获取连接成功
|
||||||
|
2026-04-17 10:06:08.646 | DEBUG | app.utils.database:close:194 - 连接已放回连接池
|
||||||
|
2026-04-17 10:06:08.646 | INFO | __main__:detect_domain:1489 - 域名 johnnasjourney.com 满足条件,已将人工复核状态设置为待人工复核
|
||||||
|
2026-04-17 10:06:08.646 | INFO | __main__:detect_domain:1493 - 域名检测完成: johnnasjourney.com
|
||||||
|
2026-04-17 10:06:08.708 | DEBUG | __main__:start_detection:1609 - 创建线程 5 成功,域名: johnny-presale.com
|
||||||
|
2026-04-17 10:06:08.708 | INFO | __main__:detect_domain:1129 - 线程 16916 开始检测域名: johnny-presale.com
|
||||||
|
2026-04-17 10:06:08.708 | DEBUG | __main__:start_detection:1619 - 启动线程 5 成功,域名: johnny-presale.com
|
||||||
|
2026-04-17 10:06:08.708 | INFO | __main__:detect_domain:1134 - 检测已停止,跳过域名: johnny-presale.com
|
||||||
|
2026-04-17 10:06:08.708 | INFO | __main__:start_detection:1629 - 当前实际线程数量: 1/1
|
||||||
|
2026-04-17 10:06:08.709 | INFO | __main__:start_detection:1581 - 检测已停止,停止创建新线程
|
||||||
|
2026-04-17 10:06:08.709 | INFO | __main__:start_detection:1646 - 等待剩余 2 个线程完成
|
||||||
|
2026-04-17 10:06:08.710 | INFO | __main__:start_detection:1650 - 检测已停止,停止等待线程完成
|
||||||
|
2026-04-17 10:06:08.710 | INFO | __main__:start_detection:1694 - 当前批次检测完成,累计处理 1000 个域名
|
||||||
|
2026-04-17 10:06:08.710 | INFO | __main__:start_detection:1706 - 域名检测任务完成
|
||||||
|
2026-04-17 10:06:45.330 | DEBUG | __main__:start_redis_subscription:1911 - Redis订阅失败: Timeout reading from socket
|
||||||
|
2026-04-17 10:06:45.330 | DEBUG | __main__:start_redis_subscription:1912 - 3秒后尝试重新连接...
|
||||||
1486
detect_worker.2026-04-18_18-44-17_493212.log
Normal file
1486
detect_worker.2026-04-18_18-44-17_493212.log
Normal file
File diff suppressed because it is too large
Load Diff
2058
detect_worker.log
2058
detect_worker.log
File diff suppressed because it is too large
Load Diff
204
detect_worker.py
204
detect_worker.py
@@ -1196,15 +1196,21 @@ class DetectWorker:
|
|||||||
success, message, seo_data = chinaz.check_title(domain_name, sensitive_words, proxy)
|
success, message, seo_data = chinaz.check_title(domain_name, sensitive_words, proxy)
|
||||||
if not success:
|
if not success:
|
||||||
logger.warning(f"站长之家检测未通过: {domain_name}, 原因: {message}")
|
logger.warning(f"站长之家检测未通过: {domain_name}, 原因: {message}")
|
||||||
# 如果是 'failure' 则不拉黑,继续执行下一个检测
|
# 如果是 'failure' 或网络连接错误,则不拉黑,继续执行下一个检测
|
||||||
if message != 'failure':
|
error_keywords = ['failure', 'timeout', 'timed out', 'max retries exceeded', 'too many open files', 'connection aborted', 'connectionabortederror']
|
||||||
|
should_blacklist = True
|
||||||
|
for keyword in error_keywords:
|
||||||
|
if keyword in message.lower():
|
||||||
|
should_blacklist = False
|
||||||
|
break
|
||||||
|
if should_blacklist:
|
||||||
# 将域名加入黑名单
|
# 将域名加入黑名单
|
||||||
self.db.update_domain_detect_status(domain_id, 4) # 4 表示黑名单
|
self.db.update_domain_detect_status(domain_id, 4) # 4 表示黑名单
|
||||||
self.db.add_to_blacklist(domain_name, message)
|
self.db.add_to_blacklist(domain_name, message)
|
||||||
logger.info(f"域名已加入黑名单: {domain_name}")
|
logger.info(f"域名已加入黑名单: {domain_name}")
|
||||||
return # 检测未通过,直接返回
|
return # 检测未通过,直接返回
|
||||||
else:
|
else:
|
||||||
logger.info(f"站长之家检测返回 failure,不拉黑域名: {domain_name}")
|
logger.info(f"站长之家检测返回 {message},不拉黑域名: {domain_name}")
|
||||||
logger.info(f"站长之家检测完成: {domain_name}")
|
logger.info(f"站长之家检测完成: {domain_name}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"站长之家检测失败: {domain_name}, 错误: {e}")
|
logger.error(f"站长之家检测失败: {domain_name}, 错误: {e}")
|
||||||
@@ -1221,15 +1227,21 @@ class DetectWorker:
|
|||||||
success, message = aizhan.check_aizhan(domain_name, sensitive_words, proxy)
|
success, message = aizhan.check_aizhan(domain_name, sensitive_words, proxy)
|
||||||
if not success:
|
if not success:
|
||||||
logger.warning(f"爱站网检测未通过: {domain_name}, 原因: {message}")
|
logger.warning(f"爱站网检测未通过: {domain_name}, 原因: {message}")
|
||||||
# 如果是 'failure' 则不拉黑,继续执行下一个检测
|
# 如果是 'failure' 或网络连接错误,则不拉黑,继续执行下一个检测
|
||||||
if message != 'failure':
|
error_keywords = ['failure', 'timeout', 'timed out', 'max retries exceeded', 'too many open files', 'connection aborted', 'connectionabortederror']
|
||||||
|
should_blacklist = True
|
||||||
|
for keyword in error_keywords:
|
||||||
|
if keyword in message.lower():
|
||||||
|
should_blacklist = False
|
||||||
|
break
|
||||||
|
if should_blacklist:
|
||||||
# 将域名加入黑名单
|
# 将域名加入黑名单
|
||||||
self.db.update_domain_detect_status(domain_id, 4) # 4 表示黑名单
|
self.db.update_domain_detect_status(domain_id, 4) # 4 表示黑名单
|
||||||
self.db.add_to_blacklist(domain_name, message)
|
self.db.add_to_blacklist(domain_name, message)
|
||||||
logger.info(f"域名已加入黑名单: {domain_name}")
|
logger.info(f"域名已加入黑名单: {domain_name}")
|
||||||
return # 检测未通过,直接返回
|
return # 检测未通过,直接返回
|
||||||
else:
|
else:
|
||||||
logger.info(f"爱站网检测返回 failure,不拉黑域名: {domain_name}")
|
logger.info(f"爱站网检测返回 {message},不拉黑域名: {domain_name}")
|
||||||
logger.info(f"爱站网检测完成: {domain_name}")
|
logger.info(f"爱站网检测完成: {domain_name}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"爱站网检测失败: {domain_name}, 错误: {e}")
|
logger.error(f"爱站网检测失败: {domain_name}, 错误: {e}")
|
||||||
@@ -1246,26 +1258,47 @@ class DetectWorker:
|
|||||||
success, message = baidu.check_site(domain_name, sensitive_words, proxy)
|
success, message = baidu.check_site(domain_name, sensitive_words, proxy)
|
||||||
if not success:
|
if not success:
|
||||||
logger.warning(f"百度site检测未通过: {domain_name}, 原因: {message}")
|
logger.warning(f"百度site检测未通过: {domain_name}, 原因: {message}")
|
||||||
# 如果是代理导致的失败,尝试不使用代理重新检测
|
# 检查是否是网络连接错误
|
||||||
if 'proxy' in locals() and locals()['proxy'] and ('timeout' in message.lower() or 'connection' in message.lower()):
|
error_keywords = ['timeout', 'timed out', 'max retries exceeded', 'too many open files', 'connection aborted', 'connectionabortederror']
|
||||||
logger.info(f"代理检测失败,尝试不使用代理重新检测: {domain_name}")
|
is_network_error = False
|
||||||
success, message = baidu.check_site(domain_name, sensitive_words, None)
|
for keyword in error_keywords:
|
||||||
if success:
|
if keyword in message.lower():
|
||||||
logger.info(f"不使用代理检测百度成功: {domain_name}")
|
is_network_error = True
|
||||||
|
break
|
||||||
|
|
||||||
|
if is_network_error:
|
||||||
|
# 如果是网络连接错误,不拉黑,继续执行下一个检测
|
||||||
|
logger.info(f"百度site检测返回网络错误 {message},不拉黑域名: {domain_name}")
|
||||||
|
else:
|
||||||
|
# 如果是代理导致的失败,尝试不使用代理重新检测
|
||||||
|
if 'proxy' in locals() and locals()['proxy']:
|
||||||
|
logger.info(f"代理检测失败,尝试不使用代理重新检测: {domain_name}")
|
||||||
|
success, message = baidu.check_site(domain_name, sensitive_words, None)
|
||||||
|
if success:
|
||||||
|
logger.info(f"不使用代理检测百度成功: {domain_name}")
|
||||||
|
else:
|
||||||
|
# 检查重新检测是否也是网络连接错误
|
||||||
|
is_retry_network_error = False
|
||||||
|
for keyword in error_keywords:
|
||||||
|
if keyword in message.lower():
|
||||||
|
is_retry_network_error = True
|
||||||
|
break
|
||||||
|
if is_retry_network_error:
|
||||||
|
logger.info(f"不使用代理检测百度返回网络错误 {message},不拉黑域名: {domain_name}")
|
||||||
|
else:
|
||||||
|
logger.warning(f"不使用代理检测百度仍未通过: {domain_name}, 原因: {message}")
|
||||||
|
# 将域名加入黑名单
|
||||||
|
self.db.update_domain_detect_status(domain_id, 4) # 4 表示黑名单
|
||||||
|
self.db.add_to_blacklist(domain_name, message)
|
||||||
|
logger.info(f"域名已加入黑名单: {domain_name}")
|
||||||
|
return # 检测未通过,直接返回
|
||||||
else:
|
else:
|
||||||
logger.warning(f"不使用代理检测百度仍未通过: {domain_name}, 原因: {message}")
|
# 其他原因导致的失败,直接加入黑名单
|
||||||
# 将域名加入黑名单
|
# 将域名加入黑名单
|
||||||
self.db.update_domain_detect_status(domain_id, 4) # 4 表示黑名单
|
self.db.update_domain_detect_status(domain_id, 4) # 4 表示黑名单
|
||||||
self.db.add_to_blacklist(domain_name, message)
|
self.db.add_to_blacklist(domain_name, message)
|
||||||
logger.info(f"域名已加入黑名单: {domain_name}")
|
logger.info(f"域名已加入黑名单: {domain_name}")
|
||||||
return # 检测未通过,直接返回
|
return # 检测未通过,直接返回
|
||||||
else:
|
|
||||||
# 其他原因导致的失败,直接加入黑名单
|
|
||||||
# 将域名加入黑名单
|
|
||||||
self.db.update_domain_detect_status(domain_id, 4) # 4 表示黑名单
|
|
||||||
self.db.add_to_blacklist(domain_name, message)
|
|
||||||
logger.info(f"域名已加入黑名单: {domain_name}")
|
|
||||||
return # 检测未通过,直接返回
|
|
||||||
logger.info(f"百度site检测完成: {domain_name}")
|
logger.info(f"百度site检测完成: {domain_name}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"百度site检测失败: {domain_name}, 错误: {e}")
|
logger.error(f"百度site检测失败: {domain_name}, 错误: {e}")
|
||||||
@@ -1276,22 +1309,41 @@ class DetectWorker:
|
|||||||
try:
|
try:
|
||||||
logger.info(f"尝试不使用代理重新检测百度: {domain_name}")
|
logger.info(f"尝试不使用代理重新检测百度: {domain_name}")
|
||||||
success, message = baidu.check_site(domain_name, sensitive_words, None)
|
success, message = baidu.check_site(domain_name, sensitive_words, None)
|
||||||
if success:
|
if not success:
|
||||||
logger.info(f"不使用代理检测百度成功: {domain_name}")
|
# 检查是否是网络连接错误
|
||||||
else:
|
error_keywords = ['timeout', 'timed out', 'max retries exceeded', 'too many open files', 'connection aborted', 'connectionabortederror']
|
||||||
logger.warning(f"不使用代理检测百度仍未通过: {domain_name}, 原因: {message}")
|
is_network_error = False
|
||||||
# 将域名加入黑名单
|
for keyword in error_keywords:
|
||||||
self.db.update_domain_detect_status(domain_id, 4) # 4 表示黑名单
|
if keyword in message.lower():
|
||||||
self.db.add_to_blacklist(domain_name, message)
|
is_network_error = True
|
||||||
logger.info(f"域名已加入黑名单: {domain_name}")
|
break
|
||||||
return # 检测未通过,直接返回
|
if is_network_error:
|
||||||
|
logger.info(f"不使用代理检测百度返回网络错误 {message},不拉黑域名: {domain_name}")
|
||||||
|
else:
|
||||||
|
logger.warning(f"不使用代理检测百度未通过: {domain_name}, 原因: {message}")
|
||||||
|
# 将域名加入黑名单
|
||||||
|
self.db.update_domain_detect_status(domain_id, 4) # 4 表示黑名单
|
||||||
|
self.db.add_to_blacklist(domain_name, message)
|
||||||
|
logger.info(f"域名已加入黑名单: {domain_name}")
|
||||||
|
return # 检测未通过,直接返回
|
||||||
|
logger.info(f"不使用代理检测百度成功: {domain_name}")
|
||||||
except Exception as e2:
|
except Exception as e2:
|
||||||
logger.error(f"不使用代理检测百度也失败: {domain_name}, 错误: {e2}")
|
logger.error(f"不使用代理检测百度也失败: {domain_name}, 错误: {e2}")
|
||||||
# 将域名加入黑名单
|
# 检查是否是网络连接错误
|
||||||
self.db.update_domain_detect_status(domain_id, 4) # 4 表示黑名单
|
error_keywords = ['timeout', 'timed out', 'max retries exceeded', 'too many open files', 'connection aborted', 'connectionabortederror']
|
||||||
self.db.add_to_blacklist(domain_name, str(e2))
|
is_network_error = False
|
||||||
logger.info(f"域名已加入黑名单: {domain_name}")
|
for keyword in error_keywords:
|
||||||
return # 检测未通过,直接返回
|
if keyword in str(e2).lower():
|
||||||
|
is_network_error = True
|
||||||
|
break
|
||||||
|
if is_network_error:
|
||||||
|
logger.info(f"不使用代理检测百度返回网络错误 {str(e2)},不拉黑域名: {domain_name}")
|
||||||
|
else:
|
||||||
|
# 将域名加入黑名单
|
||||||
|
self.db.update_domain_detect_status(domain_id, 4) # 4 表示黑名单
|
||||||
|
self.db.add_to_blacklist(domain_name, str(e2))
|
||||||
|
logger.info(f"域名已加入黑名单: {domain_name}")
|
||||||
|
return # 检测未通过,直接返回
|
||||||
|
|
||||||
# 5. 360的site查询
|
# 5. 360的site查询
|
||||||
if self.detect_options.get('detect_360_site', True):
|
if self.detect_options.get('detect_360_site', True):
|
||||||
@@ -1300,15 +1352,21 @@ class DetectWorker:
|
|||||||
passed, message = c360.check_domain(domain_name, sensitive_words, self.get_proxies())
|
passed, message = c360.check_domain(domain_name, sensitive_words, self.get_proxies())
|
||||||
if not passed:
|
if not passed:
|
||||||
logger.warning(f"360检测未通过: {domain_name}, 原因: {message}")
|
logger.warning(f"360检测未通过: {domain_name}, 原因: {message}")
|
||||||
# 如果是 'failure' 则不拉黑,继续执行下一个检测
|
# 如果是 'failure' 或网络连接错误,则不拉黑,继续执行下一个检测
|
||||||
if message != 'failure':
|
error_keywords = ['failure', 'timeout', 'timed out', 'max retries exceeded', 'too many open files', 'connection aborted', 'connectionabortederror']
|
||||||
|
should_blacklist = True
|
||||||
|
for keyword in error_keywords:
|
||||||
|
if keyword in message.lower():
|
||||||
|
should_blacklist = False
|
||||||
|
break
|
||||||
|
if should_blacklist:
|
||||||
# 将域名加入黑名单
|
# 将域名加入黑名单
|
||||||
self.db.update_domain_detect_status(domain_id, 4) # 4 表示黑名单
|
self.db.update_domain_detect_status(domain_id, 4) # 4 表示黑名单
|
||||||
self.db.add_to_blacklist(domain_name, message)
|
self.db.add_to_blacklist(domain_name, message)
|
||||||
logger.info(f"域名已加入黑名单: {domain_name}")
|
logger.info(f"域名已加入黑名单: {domain_name}")
|
||||||
return # 检测未通过,直接返回
|
return # 检测未通过,直接返回
|
||||||
else:
|
else:
|
||||||
logger.info(f"360检测返回 failure,不拉黑域名: {domain_name}")
|
logger.info(f"360检测返回 {message},不拉黑域名: {domain_name}")
|
||||||
logger.info(f"360检测完成: {domain_name}")
|
logger.info(f"360检测完成: {domain_name}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"360检测失败: {domain_name}, 错误: {e}")
|
logger.error(f"360检测失败: {domain_name}, 错误: {e}")
|
||||||
@@ -1348,6 +1406,8 @@ class DetectWorker:
|
|||||||
self.db.add_to_blacklist(domain_name, "域名状态包含clientHold或serverHold")
|
self.db.add_to_blacklist(domain_name, "域名状态包含clientHold或serverHold")
|
||||||
logger.info(f"域名已加入黑名单: {domain_name}")
|
logger.info(f"域名已加入黑名单: {domain_name}")
|
||||||
return # 检测未通过,直接返回
|
return # 检测未通过,直接返回
|
||||||
|
# 更新检测状态为已检测
|
||||||
|
self.db.update_detection_status(domain_id, 'whois', 1)
|
||||||
logger.info(f"聚查WHOIS检测完成: {domain_name}")
|
logger.info(f"聚查WHOIS检测完成: {domain_name}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"聚查WHOIS检测失败: {domain_name}, 错误: {e}")
|
logger.error(f"聚查WHOIS检测失败: {domain_name}, 错误: {e}")
|
||||||
@@ -1377,6 +1437,8 @@ class DetectWorker:
|
|||||||
pass
|
pass
|
||||||
# 更新数据库
|
# 更新数据库
|
||||||
self.db.update_domain_beian_info(domain_id, company_type, website_url, has_beian_flag, beian_year)
|
self.db.update_domain_beian_info(domain_id, company_type, website_url, has_beian_flag, beian_year)
|
||||||
|
# 更新检测状态为已检测
|
||||||
|
self.db.update_detection_status(domain_id, 'beian', 1)
|
||||||
logger.info(f"聚查备案检测完成: {domain_name}")
|
logger.info(f"聚查备案检测完成: {domain_name}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"聚查备案检测失败: {domain_name}, 错误: {e}")
|
logger.error(f"聚查备案检测失败: {domain_name}, 错误: {e}")
|
||||||
@@ -1421,6 +1483,8 @@ class DetectWorker:
|
|||||||
self.db.add_to_blacklist(domain_name, reason_str)
|
self.db.add_to_blacklist(domain_name, reason_str)
|
||||||
logger.info(f"域名已加入黑名单: {domain_name}")
|
logger.info(f"域名已加入黑名单: {domain_name}")
|
||||||
return # 检测未通过,直接返回
|
return # 检测未通过,直接返回
|
||||||
|
# 更新检测状态为已检测
|
||||||
|
self.db.update_detection_status(domain_id, 'intercept', 1)
|
||||||
logger.info(f"聚查拦截检测完成: {domain_name}")
|
logger.info(f"聚查拦截检测完成: {domain_name}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"聚查拦截检测失败: {domain_name}, 错误: {e}")
|
logger.error(f"聚查拦截检测失败: {domain_name}, 错误: {e}")
|
||||||
@@ -1433,11 +1497,17 @@ class DetectWorker:
|
|||||||
success, message = self.juziseo_instance.check_history(domain_name, sensitive_words)
|
success, message = self.juziseo_instance.check_history(domain_name, sensitive_words)
|
||||||
if not success:
|
if not success:
|
||||||
logger.warning(f"桔子历史检测未通过: {domain_name}, 原因: {message}")
|
logger.warning(f"桔子历史检测未通过: {domain_name}, 原因: {message}")
|
||||||
# 将域名加入黑名单
|
# 如果是会话超时错误,则不拉黑,继续执行下一个检测
|
||||||
self.db.update_domain_detect_status(domain_id, 4) # 4 表示黑名单
|
if '会话超时' not in message and '重新登录' not in message:
|
||||||
self.db.add_to_blacklist(domain_name, message)
|
# 将域名加入黑名单
|
||||||
logger.info(f"域名已加入黑名单: {domain_name}")
|
self.db.update_domain_detect_status(domain_id, 4) # 4 表示黑名单
|
||||||
return # 检测未通过,直接返回
|
self.db.add_to_blacklist(domain_name, message)
|
||||||
|
logger.info(f"域名已加入黑名单: {domain_name}")
|
||||||
|
return # 检测未通过,直接返回
|
||||||
|
else:
|
||||||
|
logger.info(f"桔子历史检测返回 {message},不拉黑域名: {domain_name}")
|
||||||
|
# 更新检测状态为已检测
|
||||||
|
self.db.update_detection_status(domain_id, 'juziseo_history', 1)
|
||||||
logger.info(f"桔子历史检测完成: {domain_name}")
|
logger.info(f"桔子历史检测完成: {domain_name}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"桔子历史检测失败: {domain_name}, 错误: {e}")
|
logger.error(f"桔子历史检测失败: {domain_name}, 错误: {e}")
|
||||||
@@ -1450,17 +1520,51 @@ class DetectWorker:
|
|||||||
success, message = self.juziseo_instance.check_external_link(domain_name, sensitive_words)
|
success, message = self.juziseo_instance.check_external_link(domain_name, sensitive_words)
|
||||||
if not success:
|
if not success:
|
||||||
logger.warning(f"桔子外链检测未通过: {domain_name}, 原因: {message}")
|
logger.warning(f"桔子外链检测未通过: {domain_name}, 原因: {message}")
|
||||||
# 将域名加入黑名单
|
# 如果是会话超时错误,则不拉黑,继续执行下一个检测
|
||||||
self.db.update_domain_detect_status(domain_id, 4) # 4 表示黑名单
|
if '会话超时' not in message and '重新登录' not in message:
|
||||||
self.db.add_to_blacklist(domain_name, message)
|
# 将域名加入黑名单
|
||||||
logger.info(f"域名已加入黑名单: {domain_name}")
|
self.db.update_domain_detect_status(domain_id, 4) # 4 表示黑名单
|
||||||
return # 检测未通过,直接返回
|
self.db.add_to_blacklist(domain_name, message)
|
||||||
|
logger.info(f"域名已加入黑名单: {domain_name}")
|
||||||
|
return # 检测未通过,直接返回
|
||||||
|
else:
|
||||||
|
logger.info(f"桔子外链检测返回 {message},不拉黑域名: {domain_name}")
|
||||||
|
# 更新检测状态为已检测
|
||||||
|
self.db.update_detection_status(domain_id, 'juziseo_outlink', 1)
|
||||||
logger.info(f"桔子外链检测完成: {domain_name}")
|
logger.info(f"桔子外链检测完成: {domain_name}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"桔子外链检测失败: {domain_name}, 错误: {e}")
|
logger.error(f"桔子外链检测失败: {domain_name}, 错误: {e}")
|
||||||
|
|
||||||
# 更新检测状态为已完成
|
# 检查是否所有检测选项都已完成
|
||||||
self.db.update_domain_detect_status(domain_id, 1) # 1 表示检测完成
|
all_detected = True
|
||||||
|
if self.detect_options.get('detect_whois', False):
|
||||||
|
status = self.db.get_detection_statuses(domain_id)
|
||||||
|
if status.get('whois_status', 0) != 1:
|
||||||
|
all_detected = False
|
||||||
|
if self.detect_options.get('detect_beian', False):
|
||||||
|
status = self.db.get_detection_statuses(domain_id)
|
||||||
|
if status.get('beian_status', 0) != 1:
|
||||||
|
all_detected = False
|
||||||
|
if self.detect_options.get('detect_intercept', False):
|
||||||
|
status = self.db.get_detection_statuses(domain_id)
|
||||||
|
if status.get('intercept_status', 0) != 1:
|
||||||
|
all_detected = False
|
||||||
|
if self.detect_options.get('detect_juziseo', False):
|
||||||
|
status = self.db.get_detection_statuses(domain_id)
|
||||||
|
if status.get('juziseo_history_status', 0) != 1:
|
||||||
|
all_detected = False
|
||||||
|
if self.detect_options.get('detect_juziseo_outlink', False):
|
||||||
|
status = self.db.get_detection_statuses(domain_id)
|
||||||
|
if status.get('juziseo_outlink_status', 0) != 1:
|
||||||
|
all_detected = False
|
||||||
|
|
||||||
|
# 只有当所有检测选项都已完成时,才更新检测状态为已完成
|
||||||
|
if all_detected:
|
||||||
|
self.db.update_domain_detect_status(domain_id, 1) # 1 表示检测完成
|
||||||
|
# 更新检测时间
|
||||||
|
from datetime import datetime
|
||||||
|
current_time = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
|
||||||
|
self.db.update_domain_detect_time(domain_id, current_time)
|
||||||
|
|
||||||
# 检查是否满足特定条件,如果满足且expire_date不为空,则将其置空
|
# 检查是否满足特定条件,如果满足且expire_date不为空,则将其置空
|
||||||
try:
|
try:
|
||||||
@@ -1554,7 +1658,7 @@ class DetectWorker:
|
|||||||
|
|
||||||
while self.running:
|
while self.running:
|
||||||
# 获取需要检测的域名
|
# 获取需要检测的域名
|
||||||
domains = self.db.get_domains_to_detect(limit=batch_size)
|
domains = self.db.get_domains_to_detect(limit=batch_size, detect_options=self.detect_options)
|
||||||
current_batch_size = len(domains)
|
current_batch_size = len(domains)
|
||||||
logger.info(f"获取到 {current_batch_size} 个需要检测的域名")
|
logger.info(f"获取到 {current_batch_size} 个需要检测的域名")
|
||||||
|
|
||||||
|
|||||||
194702
domains - 副本.txt
Normal file
194702
domains - 副本.txt
Normal file
File diff suppressed because it is too large
Load Diff
194
fix_on_query_finished.py
Normal file
194
fix_on_query_finished.py
Normal file
@@ -0,0 +1,194 @@
|
|||||||
|
with open('G:\\PyCode\\domainScanDemo\\app\\ui\\domain_filter.py', 'r', encoding='utf-8') as f:
|
||||||
|
content = f.read()
|
||||||
|
|
||||||
|
# 找到on_query_finished方法
|
||||||
|
start_idx = content.find('def on_query_finished')
|
||||||
|
if start_idx == -1:
|
||||||
|
print('on_query_finished method not found')
|
||||||
|
else:
|
||||||
|
# 找到方法的结束位置(下一个方法的开始)
|
||||||
|
end_idx = content.find('def ', start_idx + 1)
|
||||||
|
if end_idx == -1:
|
||||||
|
end_idx = len(content)
|
||||||
|
|
||||||
|
# 构建新的方法
|
||||||
|
new_method = ''' def on_query_finished(self, domains, conditions, total_count):
|
||||||
|
"""
|
||||||
|
查询完成回调
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
# 清空表格
|
||||||
|
self.table_widget.setRowCount(0)
|
||||||
|
|
||||||
|
# 预设置表格行数,减少UI更新次数
|
||||||
|
num_rows = len(domains)
|
||||||
|
self.table_widget.setRowCount(num_rows)
|
||||||
|
|
||||||
|
# 定义状态映射字典,避免在循环中重复创建
|
||||||
|
register_status_mapping = {
|
||||||
|
0: '待检测',
|
||||||
|
1: '已注册',
|
||||||
|
2: '可注册',
|
||||||
|
3: '宽限期',
|
||||||
|
4: '赎回期',
|
||||||
|
5: '删除期'
|
||||||
|
}
|
||||||
|
|
||||||
|
use_status_mapping = {
|
||||||
|
0: '未使用',
|
||||||
|
1: '已经使用',
|
||||||
|
2: '已经卖出',
|
||||||
|
3: '已经预定'
|
||||||
|
}
|
||||||
|
|
||||||
|
detect_status_mapping = {
|
||||||
|
0: '待检测',
|
||||||
|
1: '检测完成',
|
||||||
|
2: '检测中',
|
||||||
|
3: '黑名单',
|
||||||
|
4: '检测失败'
|
||||||
|
}
|
||||||
|
|
||||||
|
review_status_mapping = {
|
||||||
|
0: '无需复核',
|
||||||
|
1: '待人工复核',
|
||||||
|
2: '人工通过',
|
||||||
|
3: '人工拒绝'
|
||||||
|
}
|
||||||
|
|
||||||
|
has_beian_mapping = {
|
||||||
|
1: '待检测',
|
||||||
|
2: '有备案记录',
|
||||||
|
3: '没有备案记录'
|
||||||
|
}
|
||||||
|
|
||||||
|
# 添加数据到表格
|
||||||
|
for row, domain in enumerate(domains):
|
||||||
|
# 域名
|
||||||
|
self.table_widget.setItem(row, 0, QTableWidgetItem(domain['domain']))
|
||||||
|
|
||||||
|
# 注册状态
|
||||||
|
register_status = register_status_mapping.get(domain['register_status'], '未知')
|
||||||
|
self.table_widget.setItem(row, 1, QTableWidgetItem(register_status))
|
||||||
|
|
||||||
|
# 使用状态
|
||||||
|
use_status = use_status_mapping.get(domain['use_status'], '未知')
|
||||||
|
self.table_widget.setItem(row, 2, QTableWidgetItem(use_status))
|
||||||
|
|
||||||
|
# 检测状态
|
||||||
|
detect_status = detect_status_mapping.get(domain['detect_status'], '未知')
|
||||||
|
self.table_widget.setItem(row, 3, QTableWidgetItem(detect_status))
|
||||||
|
|
||||||
|
# 复核状态
|
||||||
|
review_status = review_status_mapping.get(domain['review_status'], '未知')
|
||||||
|
self.table_widget.setItem(row, 4, QTableWidgetItem(review_status))
|
||||||
|
|
||||||
|
# 域名过期时间
|
||||||
|
expire_date = domain.get('expire_date', '')
|
||||||
|
self.table_widget.setItem(row, 5, QTableWidgetItem(str(expire_date) if expire_date else ''))
|
||||||
|
|
||||||
|
# 单位性质
|
||||||
|
company_type = domain.get('company_type', '')
|
||||||
|
self.table_widget.setItem(row, 6, QTableWidgetItem(company_type))
|
||||||
|
|
||||||
|
# 首页地址
|
||||||
|
home_url = domain.get('website_url', '')
|
||||||
|
self.table_widget.setItem(row, 7, QTableWidgetItem(home_url))
|
||||||
|
|
||||||
|
# 检测时间
|
||||||
|
detect_time = domain.get('detect_time', '')
|
||||||
|
self.table_widget.setItem(row, 8, QTableWidgetItem(str(detect_time) if detect_time else ''))
|
||||||
|
|
||||||
|
# 备案历史
|
||||||
|
has_beian = has_beian_mapping.get(domain.get('has_beian'), '未知')
|
||||||
|
self.table_widget.setItem(row, 9, QTableWidgetItem(has_beian))
|
||||||
|
|
||||||
|
# 备案年份
|
||||||
|
beian_year = domain.get('beian_year', '')
|
||||||
|
self.table_widget.setItem(row, 10, QTableWidgetItem(str(beian_year) if beian_year else ''))
|
||||||
|
|
||||||
|
# 快照年份
|
||||||
|
snapshot_years = domain.get('snapshot_years', '')
|
||||||
|
self.table_widget.setItem(row, 11, QTableWidgetItem(snapshot_years))
|
||||||
|
|
||||||
|
# 百度历史收录状态
|
||||||
|
baidu_history = domain.get('baidu_history')
|
||||||
|
if baidu_history is None:
|
||||||
|
baidu_history = {}
|
||||||
|
elif isinstance(baidu_history, str):
|
||||||
|
import json
|
||||||
|
try:
|
||||||
|
baidu_history = json.loads(baidu_history)
|
||||||
|
except:
|
||||||
|
baidu_history = {}
|
||||||
|
baidu_history_status = '是' if baidu_history.get('status') else '否'
|
||||||
|
self.table_widget.setItem(row, 12, QTableWidgetItem(baidu_history_status))
|
||||||
|
|
||||||
|
# 百度site收录状态
|
||||||
|
baidu_site = domain.get('baidu_site')
|
||||||
|
if baidu_site is None:
|
||||||
|
baidu_site = {}
|
||||||
|
elif isinstance(baidu_site, str):
|
||||||
|
import json
|
||||||
|
try:
|
||||||
|
baidu_site = json.loads(baidu_site)
|
||||||
|
except:
|
||||||
|
baidu_site = {}
|
||||||
|
baidu_site_status = '是' if baidu_site.get('status') else '否'
|
||||||
|
self.table_widget.setItem(row, 13, QTableWidgetItem(baidu_site_status))
|
||||||
|
|
||||||
|
# title是否有中文
|
||||||
|
is_chinese_title = domain.get('is_chinese_title', False)
|
||||||
|
is_chinese_title_text = '是' if is_chinese_title else '否'
|
||||||
|
self.table_widget.setItem(row, 14, QTableWidgetItem(is_chinese_title_text))
|
||||||
|
|
||||||
|
# 360site收录
|
||||||
|
qihu360_site = domain.get('qihu360_site')
|
||||||
|
if qihu360_site is None:
|
||||||
|
qihu360_site = {}
|
||||||
|
elif isinstance(qihu360_site, str):
|
||||||
|
import json
|
||||||
|
try:
|
||||||
|
qihu360_site = json.loads(qihu360_site)
|
||||||
|
except:
|
||||||
|
qihu360_site = {}
|
||||||
|
qihu360_site_status = '是' if qihu360_site.get('status') else '否'
|
||||||
|
self.table_widget.setItem(row, 15, QTableWidgetItem(qihu360_site_status))
|
||||||
|
|
||||||
|
# Google site收录状态
|
||||||
|
google_site = domain.get('google_site')
|
||||||
|
if google_site is None:
|
||||||
|
google_site = {}
|
||||||
|
elif isinstance(google_site, str):
|
||||||
|
import json
|
||||||
|
try:
|
||||||
|
google_site = json.loads(google_site)
|
||||||
|
except:
|
||||||
|
google_site = {}
|
||||||
|
google_site_status = '是' if google_site.get('status') else '否'
|
||||||
|
self.table_widget.setItem(row, 16, QTableWidgetItem(google_site_status))
|
||||||
|
|
||||||
|
# 友情链接数量
|
||||||
|
backlink_count = domain.get('backlink_count', 0)
|
||||||
|
self.table_widget.setItem(row, 17, QTableWidgetItem(str(backlink_count)))
|
||||||
|
|
||||||
|
# 显示查询结果,包括总数、总页数和当前页码
|
||||||
|
current_page_count = len(domains)
|
||||||
|
page_size = self.page_size_spinbox.value()
|
||||||
|
total_pages = (total_count + page_size - 1) // page_size # 向上取整计算总页数
|
||||||
|
current_page = self.page_spinbox.value()
|
||||||
|
self.status_label.setText(f"查询完成,共 {total_count} 条记录,当前页显示 {current_page_count} 条,共 {total_pages} 页,当前第 {current_page} 页")
|
||||||
|
logger.info(f"查询完成,共 {total_count} 条记录,当前页显示 {current_page_count} 条,共 {total_pages} 页,当前第 {current_page} 页")
|
||||||
|
except Exception as e:
|
||||||
|
self.status_label.setText(f"处理查询结果时出错: {str(e)}")
|
||||||
|
logger.error(f"处理查询结果时出错: {e}")
|
||||||
|
'''
|
||||||
|
|
||||||
|
# 替换方法
|
||||||
|
new_content = content[:start_idx] + new_method + content[end_idx:]
|
||||||
|
|
||||||
|
# 写回文件
|
||||||
|
with open('G:\\PyCode\\domainScanDemo\\app\\ui\\domain_filter.py', 'w', encoding='utf-8') as f:
|
||||||
|
f.write(new_content)
|
||||||
|
|
||||||
|
print('on_query_finished method updated successfully')
|
||||||
283
fix_update_thread.py
Normal file
283
fix_update_thread.py
Normal file
@@ -0,0 +1,283 @@
|
|||||||
|
with open('G:\\PyCode\\domainScanDemo\\app\\ui\\domain_filter.py', 'r', encoding='utf-8') as f:
|
||||||
|
content = f.read()
|
||||||
|
|
||||||
|
# 找到UpdateThread类
|
||||||
|
start_idx = content.find('class UpdateThread(QThread):')
|
||||||
|
if start_idx == -1:
|
||||||
|
print('UpdateThread class not found')
|
||||||
|
else:
|
||||||
|
# 找到类的结束位置(下一个类的开始)
|
||||||
|
end_idx = content.find('class QueryThread(QThread):', start_idx)
|
||||||
|
if end_idx == -1:
|
||||||
|
end_idx = len(content)
|
||||||
|
|
||||||
|
# 构建新的UpdateThread类
|
||||||
|
new_update_thread = '''class UpdateThread(QThread):
|
||||||
|
"""
|
||||||
|
批量更新线程
|
||||||
|
"""
|
||||||
|
update_finished = Signal(int, dict)
|
||||||
|
|
||||||
|
def __init__(self, selected_domains, update_values):
|
||||||
|
super().__init__()
|
||||||
|
self.selected_domains = selected_domains
|
||||||
|
self.update_values = update_values
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
"""
|
||||||
|
执行批量更新
|
||||||
|
"""
|
||||||
|
# 转换状态值的映射
|
||||||
|
status_mappings = {
|
||||||
|
'复核状态': {
|
||||||
|
'无需复核': 0,
|
||||||
|
'待人工复核': 1,
|
||||||
|
'人工通过': 2,
|
||||||
|
'人工拒绝': 3
|
||||||
|
},
|
||||||
|
'备案历史': {
|
||||||
|
'待检测': 1,
|
||||||
|
'有备案记录': 2,
|
||||||
|
'没有备案记录': 3
|
||||||
|
},
|
||||||
|
'备案年份': {
|
||||||
|
'2026': 2026,
|
||||||
|
'2025': 2025,
|
||||||
|
'2024': 2024,
|
||||||
|
'2023': 2023,
|
||||||
|
'2022': 2022,
|
||||||
|
'2021': 2021,
|
||||||
|
'2020': 2020
|
||||||
|
},
|
||||||
|
'域名快照年份': {
|
||||||
|
'2026,2025,2024': '2026,2025,2024',
|
||||||
|
'2026': '2026',
|
||||||
|
'2025': '2025',
|
||||||
|
'2024': '2024',
|
||||||
|
'2023': '2023',
|
||||||
|
'2022': '2022',
|
||||||
|
'2021': '2021',
|
||||||
|
'2020': '2020'
|
||||||
|
},
|
||||||
|
'单位性质': {
|
||||||
|
'企业': '企业',
|
||||||
|
'个人': '个人'
|
||||||
|
},
|
||||||
|
'百度历史收录状态': {
|
||||||
|
'是': True,
|
||||||
|
'否': False
|
||||||
|
},
|
||||||
|
'百度site收录状态': {
|
||||||
|
'是': True,
|
||||||
|
'否': False
|
||||||
|
},
|
||||||
|
'title是否简体中文': {
|
||||||
|
'是': True,
|
||||||
|
'否': False
|
||||||
|
},
|
||||||
|
'360 site收录状态': {
|
||||||
|
'是': True,
|
||||||
|
'否': False
|
||||||
|
},
|
||||||
|
'Google site收录状态': {
|
||||||
|
'是': True,
|
||||||
|
'否': False
|
||||||
|
},
|
||||||
|
'快照历史友链数量是否大于10': {
|
||||||
|
'是': True,
|
||||||
|
'否': False
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
updated_count = 0
|
||||||
|
update_data = {}
|
||||||
|
|
||||||
|
try:
|
||||||
|
db = Database()
|
||||||
|
# 获取一个数据库连接,在整个批量更新过程中使用
|
||||||
|
conn, cur = db.connect()
|
||||||
|
if not conn or not cur:
|
||||||
|
logger.error("获取数据库连接失败")
|
||||||
|
self.update_finished.emit(0, {})
|
||||||
|
return
|
||||||
|
|
||||||
|
try:
|
||||||
|
for domain in self.selected_domains:
|
||||||
|
# 获取域名ID
|
||||||
|
domain_info = db.get_domain_by_name(domain)
|
||||||
|
if domain_info:
|
||||||
|
try:
|
||||||
|
domain_update_data = {}
|
||||||
|
|
||||||
|
# 1. 复核状态
|
||||||
|
review_status_value = self.update_values['review_status']
|
||||||
|
if review_status_value != '不更新':
|
||||||
|
status_value = status_mappings['复核状态'][review_status_value]
|
||||||
|
cur.execute("UPDATE domains SET review_status = %s WHERE id = %s", (status_value, domain_info['id']))
|
||||||
|
domain_update_data['review_status'] = review_status_value
|
||||||
|
|
||||||
|
# 2. 域名过期时间
|
||||||
|
expire_date_value = self.update_values['expire_date']
|
||||||
|
if expire_date_value and expire_date_value != '不更新':
|
||||||
|
if expire_date_value == '当前时间':
|
||||||
|
cur.execute("UPDATE domains SET expire_date = CURRENT_TIMESTAMP WHERE id = %s", (domain_info['id'],))
|
||||||
|
import datetime
|
||||||
|
domain_update_data['expire_date'] = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
|
||||||
|
else:
|
||||||
|
cur.execute("UPDATE domains SET expire_date = %s WHERE id = %s", (expire_date_value, domain_info['id']))
|
||||||
|
domain_update_data['expire_date'] = expire_date_value
|
||||||
|
|
||||||
|
# 3. 备案历史
|
||||||
|
has_beian_value = self.update_values['has_beian']
|
||||||
|
if has_beian_value != '不更新':
|
||||||
|
status_value = status_mappings['备案历史'][has_beian_value]
|
||||||
|
cur.execute("UPDATE domains SET has_beian = %s WHERE id = %s", (status_value, domain_info['id']))
|
||||||
|
domain_update_data['has_beian'] = has_beian_value
|
||||||
|
|
||||||
|
# 4. 备案年份
|
||||||
|
beian_year_value = self.update_values['beian_year']
|
||||||
|
if beian_year_value and beian_year_value != '不更新':
|
||||||
|
cur.execute("UPDATE domains SET beian_year = %s WHERE id = %s", (beian_year_value, domain_info['id']))
|
||||||
|
domain_update_data['beian_year'] = beian_year_value
|
||||||
|
|
||||||
|
# 5. 域名快照年份
|
||||||
|
snapshot_years_value = self.update_values['snapshot_years']
|
||||||
|
if snapshot_years_value and snapshot_years_value != '不更新':
|
||||||
|
cur.execute("UPDATE domains SET snapshot_years = %s WHERE id = %s", (snapshot_years_value, domain_info['id']))
|
||||||
|
domain_update_data['snapshot_years'] = snapshot_years_value
|
||||||
|
|
||||||
|
# 6. 单位性质
|
||||||
|
company_type_value = self.update_values['company_type']
|
||||||
|
if company_type_value != '不更新':
|
||||||
|
status_value = status_mappings['单位性质'][company_type_value]
|
||||||
|
cur.execute("UPDATE domains SET company_type = %s WHERE id = %s", (status_value, domain_info['id']))
|
||||||
|
domain_update_data['company_type'] = company_type_value
|
||||||
|
|
||||||
|
# 7. 检测时间
|
||||||
|
detect_time_value = self.update_values['detect_time']
|
||||||
|
if detect_time_value and detect_time_value != '不更新':
|
||||||
|
if detect_time_value == '当前时间':
|
||||||
|
cur.execute("UPDATE domains SET detect_time = CURRENT_TIMESTAMP WHERE id = %s", (domain_info['id'],))
|
||||||
|
import datetime
|
||||||
|
domain_update_data['detect_time'] = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
|
||||||
|
else:
|
||||||
|
cur.execute("UPDATE domains SET detect_time = %s WHERE id = %s", (detect_time_value, domain_info['id']))
|
||||||
|
domain_update_data['detect_time'] = detect_time_value
|
||||||
|
|
||||||
|
# 8. 检查domain_detections表中是否存在记录
|
||||||
|
cur.execute("SELECT id FROM domain_detections WHERE domain_id = %s", (domain_info['id'],))
|
||||||
|
detection_id = cur.fetchone()
|
||||||
|
|
||||||
|
# 9. 首页网址
|
||||||
|
website_url_value = self.update_values['website_url']
|
||||||
|
if website_url_value != '不更新':
|
||||||
|
# 更新域名表中的website_url字段
|
||||||
|
cur.execute("UPDATE domains SET website_url = %s WHERE id = %s", (website_url_value, domain_info['id']))
|
||||||
|
domain_update_data['website_url'] = website_url_value
|
||||||
|
|
||||||
|
# 10. 百度历史收录状态
|
||||||
|
baidu_history_value = self.update_values['baidu_history']
|
||||||
|
if baidu_history_value != '不更新':
|
||||||
|
status_value = status_mappings['百度历史收录状态'][baidu_history_value]
|
||||||
|
# 转换为JSON格式
|
||||||
|
import json
|
||||||
|
json_value = json.dumps({"status": status_value})
|
||||||
|
if detection_id:
|
||||||
|
cur.execute("UPDATE domain_detections SET baidu_history = %s WHERE domain_id = %s", (json_value, domain_info['id']))
|
||||||
|
else:
|
||||||
|
cur.execute("INSERT INTO domain_detections (domain_id, baidu_history) VALUES (%s, %s)", (domain_info['id'], json_value))
|
||||||
|
domain_update_data['baidu_history'] = baidu_history_value
|
||||||
|
|
||||||
|
# 11. 百度site收录状态
|
||||||
|
baidu_site_value = self.update_values['baidu_site']
|
||||||
|
if baidu_site_value != '不更新':
|
||||||
|
status_value = status_mappings['百度site收录状态'][baidu_site_value]
|
||||||
|
# 转换为JSON格式
|
||||||
|
import json
|
||||||
|
json_value = json.dumps({"status": status_value})
|
||||||
|
if detection_id:
|
||||||
|
cur.execute("UPDATE domain_detections SET baidu_site = %s WHERE domain_id = %s", (json_value, domain_info['id']))
|
||||||
|
else:
|
||||||
|
cur.execute("INSERT INTO domain_detections (domain_id, baidu_site) VALUES (%s, %s)", (domain_info['id'], json_value))
|
||||||
|
domain_update_data['baidu_site'] = baidu_site_value
|
||||||
|
|
||||||
|
# 12. title是否简体中文
|
||||||
|
is_chinese_title_value = self.update_values['is_chinese_title']
|
||||||
|
if is_chinese_title_value != '不更新':
|
||||||
|
status_value = status_mappings['title是否简体中文'][is_chinese_title_value]
|
||||||
|
if detection_id:
|
||||||
|
cur.execute("UPDATE domain_detections SET is_chinese_title = %s WHERE domain_id = %s", (status_value, domain_info['id']))
|
||||||
|
else:
|
||||||
|
cur.execute("INSERT INTO domain_detections (domain_id, is_chinese_title) VALUES (%s, %s)", (domain_info['id'], status_value))
|
||||||
|
domain_update_data['is_chinese_title'] = is_chinese_title_value
|
||||||
|
|
||||||
|
# 13. 360 site收录状态
|
||||||
|
qihu360_site_value = self.update_values['qihu360_site']
|
||||||
|
if qihu360_site_value != '不更新':
|
||||||
|
status_value = status_mappings['360 site收录状态'][qihu360_site_value]
|
||||||
|
# 转换为JSON格式
|
||||||
|
import json
|
||||||
|
json_value = json.dumps({"status": status_value})
|
||||||
|
if detection_id:
|
||||||
|
cur.execute("UPDATE domain_detections SET qihu360_site = %s WHERE domain_id = %s", (json_value, domain_info['id']))
|
||||||
|
else:
|
||||||
|
cur.execute("INSERT INTO domain_detections (domain_id, qihu360_site) VALUES (%s, %s)", (domain_info['id'], json_value))
|
||||||
|
domain_update_data['qihu360_site'] = qihu360_site_value
|
||||||
|
|
||||||
|
# 14. Google site收录状态
|
||||||
|
google_site_value = self.update_values['google_site']
|
||||||
|
if google_site_value != '不更新':
|
||||||
|
status_value = status_mappings['Google site收录状态'][google_site_value]
|
||||||
|
# 转换为JSON格式
|
||||||
|
import json
|
||||||
|
json_value = json.dumps({"status": status_value})
|
||||||
|
if detection_id:
|
||||||
|
cur.execute("UPDATE domain_detections SET google_site = %s WHERE domain_id = %s", (json_value, domain_info['id']))
|
||||||
|
else:
|
||||||
|
cur.execute("INSERT INTO domain_detections (domain_id, google_site) VALUES (%s, %s)", (domain_info['id'], json_value))
|
||||||
|
domain_update_data['google_site'] = google_site_value
|
||||||
|
|
||||||
|
# 15. 友链数量
|
||||||
|
backlink_count_value = self.update_values['backlink_count']
|
||||||
|
if backlink_count_value and backlink_count_value != '不更新':
|
||||||
|
# 更新domains表中的backlink_count字段
|
||||||
|
cur.execute("UPDATE domains SET backlink_count = %s WHERE id = %s", (backlink_count_value, domain_info['id']))
|
||||||
|
# 同时更新domain_detections表中的backlink_count_gt_10字段(是否大于10)
|
||||||
|
backlink_count_gt_10 = int(backlink_count_value) > 10
|
||||||
|
if detection_id:
|
||||||
|
cur.execute("UPDATE domain_detections SET backlink_count_gt_10 = %s WHERE domain_id = %s", (backlink_count_gt_10, domain_info['id']))
|
||||||
|
else:
|
||||||
|
cur.execute("INSERT INTO domain_detections (domain_id, backlink_count_gt_10) VALUES (%s, %s)", (domain_info['id'], backlink_count_gt_10))
|
||||||
|
domain_update_data['backlink_count'] = backlink_count_value
|
||||||
|
|
||||||
|
# 提交事务
|
||||||
|
conn.commit()
|
||||||
|
updated_count += 1
|
||||||
|
update_data[domain] = domain_update_data
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f"更新域名状态失败: {e}")
|
||||||
|
if conn:
|
||||||
|
try:
|
||||||
|
conn.rollback()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f"批量更新失败: {e}")
|
||||||
|
finally:
|
||||||
|
# 关闭连接
|
||||||
|
db.close(conn, cur)
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f"更新状态失败: {e}")
|
||||||
|
|
||||||
|
# 发送更新完成信号
|
||||||
|
self.update_finished.emit(updated_count, update_data)
|
||||||
|
'''
|
||||||
|
|
||||||
|
# 替换UpdateThread类
|
||||||
|
new_content = content[:start_idx] + new_update_thread + content[end_idx:]
|
||||||
|
|
||||||
|
# 写回文件
|
||||||
|
with open('G:\\PyCode\\domainScanDemo\\app\\ui\\domain_filter.py', 'w', encoding='utf-8') as f:
|
||||||
|
f.write(new_content)
|
||||||
|
|
||||||
|
print('UpdateThread class updated successfully')
|
||||||
Binary file not shown.
Binary file not shown.
20577
logs/app.log
Normal file
20577
logs/app.log
Normal file
File diff suppressed because one or more lines are too long
0
optimize_update_thread.py
Normal file
0
optimize_update_thread.py
Normal file
290
update_update_thread.py
Normal file
290
update_update_thread.py
Normal file
@@ -0,0 +1,290 @@
|
|||||||
|
# 读取文件内容
|
||||||
|
with open('G:\PyCode\domainScanDemo\app\ui\domain_filter.py', 'r', encoding='utf-8') as f:
|
||||||
|
lines = f.readlines()
|
||||||
|
|
||||||
|
# 找到UpdateThread类的开始和结束行
|
||||||
|
start_line = -1
|
||||||
|
end_line = -1
|
||||||
|
for i, line in enumerate(lines):
|
||||||
|
if 'class UpdateThread(QThread):' in line:
|
||||||
|
start_line = i
|
||||||
|
elif start_line != -1 and 'class QueryThread(QThread):' in line:
|
||||||
|
end_line = i
|
||||||
|
break
|
||||||
|
|
||||||
|
if start_line != -1 and end_line != -1:
|
||||||
|
# 构建新的UpdateThread类
|
||||||
|
new_update_thread = [
|
||||||
|
'class UpdateThread(QThread):\n',
|
||||||
|
' """\n',
|
||||||
|
' 批量更新线程\n',
|
||||||
|
' """\n',
|
||||||
|
' update_finished = Signal(int, dict)\n',
|
||||||
|
' \n',
|
||||||
|
' def __init__(self, selected_domains, update_values):\n',
|
||||||
|
' super().__init__()\n',
|
||||||
|
' self.selected_domains = selected_domains\n',
|
||||||
|
' self.update_values = update_values\n',
|
||||||
|
' \n',
|
||||||
|
' def run(self):\n',
|
||||||
|
' """\n',
|
||||||
|
' 执行批量更新\n',
|
||||||
|
' """\n',
|
||||||
|
' # 转换状态值的映射\n',
|
||||||
|
' status_mappings = {\n',
|
||||||
|
' \'复核状态\': {\n',
|
||||||
|
' \'无需复核\': 0,\n',
|
||||||
|
' \'待人工复核\': 1,\n',
|
||||||
|
' \'人工通过\': 2,\n',
|
||||||
|
' \'人工拒绝\': 3\n',
|
||||||
|
' },\n',
|
||||||
|
' \'备案历史\': {\n',
|
||||||
|
' \'待检测\': 1,\n',
|
||||||
|
' \'有备案记录\': 2,\n',
|
||||||
|
' \'没有备案记录\': 3\n',
|
||||||
|
' },\n',
|
||||||
|
' \'备案年份\': {\n',
|
||||||
|
' \'2026\': 2026,\n',
|
||||||
|
' \'2025\': 2025,\n',
|
||||||
|
' \'2024\': 2024,\n',
|
||||||
|
' \'2023\': 2023,\n',
|
||||||
|
' \'2022\': 2022,\n',
|
||||||
|
' \'2021\': 2021,\n',
|
||||||
|
' \'2020\': 2020\n',
|
||||||
|
' },\n',
|
||||||
|
' \'域名快照年份\': {\n',
|
||||||
|
' \'2026,2025,2024\': \'2026,2025,2024\',\n',
|
||||||
|
' \'2026\': \'2026\',\n',
|
||||||
|
' \'2025\': \'2025\',\n',
|
||||||
|
' \'2024\': \'2024\',\n',
|
||||||
|
' \'2023\': \'2023\',\n',
|
||||||
|
' \'2022\': \'2022\',\n',
|
||||||
|
' \'2021\': \'2021\',\n',
|
||||||
|
' \'2020\': \'2020\'\n',
|
||||||
|
' },\n',
|
||||||
|
' \'单位性质\': {\n',
|
||||||
|
' \'企业\': \'企业\',\n',
|
||||||
|
' \'个人\': \'个人\'\n',
|
||||||
|
' },\n',
|
||||||
|
' \'百度历史收录状态\': {\n',
|
||||||
|
' \'是\': True,\n',
|
||||||
|
' \'否\': False\n',
|
||||||
|
' },\n',
|
||||||
|
' \'百度site收录状态\': {\n',
|
||||||
|
' \'是\': True,\n',
|
||||||
|
' \'否\': False\n',
|
||||||
|
' },\n',
|
||||||
|
' \'title是否简体中文\': {\n',
|
||||||
|
' \'是\': True,\n',
|
||||||
|
' \'否\': False\n',
|
||||||
|
' },\n',
|
||||||
|
' \'360 site收录状态\': {\n',
|
||||||
|
' \'是\': True,\n',
|
||||||
|
' \'否\': False\n',
|
||||||
|
' },\n',
|
||||||
|
' \'Google site收录状态\': {\n',
|
||||||
|
' \'是\': True,\n',
|
||||||
|
' \'否\': False\n',
|
||||||
|
' },\n',
|
||||||
|
' \'快照历史友链数量是否大于10\': {\n',
|
||||||
|
' \'是\': True,\n',
|
||||||
|
' \'否\': False\n',
|
||||||
|
' }\n',
|
||||||
|
' }\n',
|
||||||
|
' \n',
|
||||||
|
' updated_count = 0\n',
|
||||||
|
' update_data = {}\n',
|
||||||
|
' \n',
|
||||||
|
' try:\n',
|
||||||
|
' db = Database()\n',
|
||||||
|
' # 获取一个数据库连接,在整个批量更新过程中使用\n',
|
||||||
|
' conn, cur = db.connect()\n',
|
||||||
|
' if not conn or not cur:\n',
|
||||||
|
' logger.error("获取数据库连接失败")\n',
|
||||||
|
' self.update_finished.emit(0, {})\n',
|
||||||
|
' return\n',
|
||||||
|
' \n',
|
||||||
|
' try:\n',
|
||||||
|
' for domain in self.selected_domains:\n',
|
||||||
|
' # 获取域名ID\n',
|
||||||
|
' domain_info = db.get_domain_by_name(domain)\n',
|
||||||
|
' if domain_info:\n',
|
||||||
|
' try:\n',
|
||||||
|
' domain_update_data = {}\n',
|
||||||
|
' \n',
|
||||||
|
' # 1. 复核状态\n',
|
||||||
|
' review_status_value = self.update_values[\'review_status\']\n',
|
||||||
|
' if review_status_value != \'不更新\':\n',
|
||||||
|
' status_value = status_mappings[\'复核状态\'][review_status_value]\n',
|
||||||
|
' cur.execute("UPDATE domains SET review_status = %s WHERE id = %s", (status_value, domain_info[\'id\']))\n',
|
||||||
|
' domain_update_data[\'review_status\'] = review_status_value\n',
|
||||||
|
' \n',
|
||||||
|
' # 2. 域名过期时间\n',
|
||||||
|
' expire_date_value = self.update_values[\'expire_date\']\n',
|
||||||
|
' if expire_date_value and expire_date_value != \'不更新\':\n',
|
||||||
|
' if expire_date_value == \'当前时间\':\n',
|
||||||
|
' cur.execute("UPDATE domains SET expire_date = CURRENT_TIMESTAMP WHERE id = %s", (domain_info[\'id\'],))\n',
|
||||||
|
' import datetime\n',
|
||||||
|
' domain_update_data[\'expire_date\'] = datetime.datetime.now().strftime(\'%Y-%m-%d %H:%M:%S\')\n',
|
||||||
|
' else:\n',
|
||||||
|
' cur.execute("UPDATE domains SET expire_date = %s WHERE id = %s", (expire_date_value, domain_info[\'id\']))\n',
|
||||||
|
' domain_update_data[\'expire_date\'] = expire_date_value\n',
|
||||||
|
' \n',
|
||||||
|
' # 3. 备案历史\n',
|
||||||
|
' has_beian_value = self.update_values[\'has_beian\']\n',
|
||||||
|
' if has_beian_value != \'不更新\':\n',
|
||||||
|
' status_value = status_mappings[\'备案历史\'][has_beian_value]\n',
|
||||||
|
' cur.execute("UPDATE domains SET has_beian = %s WHERE id = %s", (status_value, domain_info[\'id\']))\n',
|
||||||
|
' domain_update_data[\'has_beian\'] = has_beian_value\n',
|
||||||
|
' \n',
|
||||||
|
' # 4. 备案年份\n',
|
||||||
|
' beian_year_value = self.update_values[\'beian_year\']\n',
|
||||||
|
' if beian_year_value and beian_year_value != \'不更新\':\n',
|
||||||
|
' cur.execute("UPDATE domains SET beian_year = %s WHERE id = %s", (beian_year_value, domain_info[\'id\']))\n',
|
||||||
|
' domain_update_data[\'beian_year\'] = beian_year_value\n',
|
||||||
|
' \n',
|
||||||
|
' # 5. 域名快照年份\n',
|
||||||
|
' snapshot_years_value = self.update_values[\'snapshot_years\']\n',
|
||||||
|
' if snapshot_years_value and snapshot_years_value != \'不更新\':\n',
|
||||||
|
' cur.execute("UPDATE domains SET snapshot_years = %s WHERE id = %s", (snapshot_years_value, domain_info[\'id\']))\n',
|
||||||
|
' domain_update_data[\'snapshot_years\'] = snapshot_years_value\n',
|
||||||
|
' \n',
|
||||||
|
' # 6. 单位性质\n',
|
||||||
|
' company_type_value = self.update_values[\'company_type\']\n',
|
||||||
|
' if company_type_value != \'不更新\':\n',
|
||||||
|
' status_value = status_mappings[\'单位性质\'][company_type_value]\n',
|
||||||
|
' cur.execute("UPDATE domains SET company_type = %s WHERE id = %s", (status_value, domain_info[\'id\']))\n',
|
||||||
|
' domain_update_data[\'company_type\'] = company_type_value\n',
|
||||||
|
' \n',
|
||||||
|
' # 7. 检测时间\n',
|
||||||
|
' detect_time_value = self.update_values[\'detect_time\']\n',
|
||||||
|
' if detect_time_value and detect_time_value != \'不更新\':\n',
|
||||||
|
' if detect_time_value == \'当前时间\':\n',
|
||||||
|
' cur.execute("UPDATE domains SET detect_time = CURRENT_TIMESTAMP WHERE id = %s", (domain_info[\'id\'],))\n',
|
||||||
|
' import datetime\n',
|
||||||
|
' domain_update_data[\'detect_time\'] = datetime.datetime.now().strftime(\'%Y-%m-%d %H:%M:%S\')\n',
|
||||||
|
' else:\n',
|
||||||
|
' cur.execute("UPDATE domains SET detect_time = %s WHERE id = %s", (detect_time_value, domain_info[\'id\']))\n',
|
||||||
|
' domain_update_data[\'detect_time\'] = detect_time_value\n',
|
||||||
|
' \n',
|
||||||
|
' # 8. 检查domain_detections表中是否存在记录\n',
|
||||||
|
' cur.execute("SELECT id FROM domain_detections WHERE domain_id = %s", (domain_info[\'id\'],))\n',
|
||||||
|
' detection_id = cur.fetchone()\n',
|
||||||
|
' \n',
|
||||||
|
' # 9. 首页网址\n',
|
||||||
|
' website_url_value = self.update_values[\'website_url\']\n',
|
||||||
|
' if website_url_value != \'不更新\':\n',
|
||||||
|
' # 更新域名表中的website_url字段\n',
|
||||||
|
' cur.execute("UPDATE domains SET website_url = %s WHERE id = %s", (website_url_value, domain_info[\'id\']))\n',
|
||||||
|
' domain_update_data[\'website_url\'] = website_url_value\n',
|
||||||
|
' \n',
|
||||||
|
' # 10. 百度历史收录状态\n',
|
||||||
|
' baidu_history_value = self.update_values[\'baidu_history\']\n',
|
||||||
|
' if baidu_history_value != \'不更新\':\n',
|
||||||
|
' status_value = status_mappings[\'百度历史收录状态\'][baidu_history_value]\n',
|
||||||
|
' # 转换为JSON格式\n',
|
||||||
|
' import json\n',
|
||||||
|
' json_value = json.dumps({"status": status_value})\n',
|
||||||
|
' if detection_id:\n',
|
||||||
|
' cur.execute("UPDATE domain_detections SET baidu_history = %s WHERE domain_id = %s", (json_value, domain_info[\'id\']))\n',
|
||||||
|
' else:\n',
|
||||||
|
' cur.execute("INSERT INTO domain_detections (domain_id, baidu_history) VALUES (%s, %s)", (domain_info[\'id\'], json_value))\n',
|
||||||
|
' domain_update_data[\'baidu_history\'] = baidu_history_value\n',
|
||||||
|
' \n',
|
||||||
|
' # 11. 百度site收录状态\n',
|
||||||
|
' baidu_site_value = self.update_values[\'baidu_site\']\n',
|
||||||
|
' if baidu_site_value != \'不更新\':\n',
|
||||||
|
' status_value = status_mappings[\'百度site收录状态\'][baidu_site_value]\n',
|
||||||
|
' # 转换为JSON格式\n',
|
||||||
|
' import json\n',
|
||||||
|
' json_value = json.dumps({"status": status_value})\n',
|
||||||
|
' if detection_id:\n',
|
||||||
|
' cur.execute("UPDATE domain_detections SET baidu_site = %s WHERE domain_id = %s", (json_value, domain_info[\'id\']))\n',
|
||||||
|
' else:\n',
|
||||||
|
' cur.execute("INSERT INTO domain_detections (domain_id, baidu_site) VALUES (%s, %s)", (domain_info[\'id\'], json_value))\n',
|
||||||
|
' domain_update_data[\'baidu_site\'] = baidu_site_value\n',
|
||||||
|
' \n',
|
||||||
|
' # 12. title是否简体中文\n',
|
||||||
|
' is_chinese_title_value = self.update_values[\'is_chinese_title\']\n',
|
||||||
|
' if is_chinese_title_value != \'不更新\':\n',
|
||||||
|
' status_value = status_mappings[\'title是否简体中文\'][is_chinese_title_value]\n',
|
||||||
|
' if detection_id:\n',
|
||||||
|
' cur.execute("UPDATE domain_detections SET is_chinese_title = %s WHERE domain_id = %s", (status_value, domain_info[\'id\']))\n',
|
||||||
|
' else:\n',
|
||||||
|
' cur.execute("INSERT INTO domain_detections (domain_id, is_chinese_title) VALUES (%s, %s)", (domain_info[\'id\'], status_value))\n',
|
||||||
|
' domain_update_data[\'is_chinese_title\'] = is_chinese_title_value\n',
|
||||||
|
' \n',
|
||||||
|
' # 13. 360 site收录状态\n',
|
||||||
|
' qihu360_site_value = self.update_values[\'qihu360_site\']\n',
|
||||||
|
' if qihu360_site_value != \'不更新\':\n',
|
||||||
|
' status_value = status_mappings[\'360 site收录状态\'][qihu360_site_value]\n',
|
||||||
|
' # 转换为JSON格式\n',
|
||||||
|
' import json\n',
|
||||||
|
' json_value = json.dumps({"status": status_value})\n',
|
||||||
|
' if detection_id:\n',
|
||||||
|
' cur.execute("UPDATE domain_detections SET qihu360_site = %s WHERE domain_id = %s", (json_value, domain_info[\'id\']))\n',
|
||||||
|
' else:\n',
|
||||||
|
' cur.execute("INSERT INTO domain_detections (domain_id, qihu360_site) VALUES (%s, %s)", (domain_info[\'id\'], json_value))\n',
|
||||||
|
' domain_update_data[\'qihu360_site\'] = qihu360_site_value\n',
|
||||||
|
' \n',
|
||||||
|
' # 14. Google site收录状态\n',
|
||||||
|
' google_site_value = self.update_values[\'google_site\']\n',
|
||||||
|
' if google_site_value != \'不更新\':\n',
|
||||||
|
' status_value = status_mappings[\'Google site收录状态\'][google_site_value]\n',
|
||||||
|
' # 转换为JSON格式\n',
|
||||||
|
' import json\n',
|
||||||
|
' json_value = json.dumps({"status": status_value})\n',
|
||||||
|
' if detection_id:\n',
|
||||||
|
' cur.execute("UPDATE domain_detections SET google_site = %s WHERE domain_id = %s", (json_value, domain_info[\'id\']))\n',
|
||||||
|
' else:\n',
|
||||||
|
' cur.execute("INSERT INTO domain_detections (domain_id, google_site) VALUES (%s, %s)", (domain_info[\'id\'], json_value))\n',
|
||||||
|
' domain_update_data[\'google_site\'] = google_site_value\n',
|
||||||
|
' \n',
|
||||||
|
' # 15. 友链数量\n',
|
||||||
|
' backlink_count_value = self.update_values[\'backlink_count\']\n',
|
||||||
|
' if backlink_count_value and backlink_count_value != \'不更新\':\n',
|
||||||
|
' # 更新domains表中的backlink_count字段\n',
|
||||||
|
' cur.execute("UPDATE domains SET backlink_count = %s WHERE id = %s", (backlink_count_value, domain_info[\'id\']))\n',
|
||||||
|
' # 同时更新domain_detections表中的backlink_count_gt_10字段(是否大于10)\n',
|
||||||
|
' backlink_count_gt_10 = int(backlink_count_value) > 10\n',
|
||||||
|
' if detection_id:\n',
|
||||||
|
' cur.execute("UPDATE domain_detections SET backlink_count_gt_10 = %s WHERE domain_id = %s", (backlink_count_gt_10, domain_info[\'id\']))\n',
|
||||||
|
' else:\n',
|
||||||
|
' cur.execute("INSERT INTO domain_detections (domain_id, backlink_count_gt_10) VALUES (%s, %s)", (domain_info[\'id\'], backlink_count_gt_10))\n',
|
||||||
|
' domain_update_data[\'backlink_count\'] = backlink_count_value\n',
|
||||||
|
' \n',
|
||||||
|
' # 提交事务\n',
|
||||||
|
' conn.commit()\n',
|
||||||
|
' updated_count += 1\n',
|
||||||
|
' update_data[domain] = domain_update_data\n',
|
||||||
|
' except Exception as e:\n',
|
||||||
|
' logger.error(f"更新域名状态失败: {e}")\n',
|
||||||
|
' if conn:\n',
|
||||||
|
' try:\n',
|
||||||
|
' conn.rollback()\n',
|
||||||
|
' except:\n',
|
||||||
|
' pass\n',
|
||||||
|
' except Exception as e:\n',
|
||||||
|
' logger.error(f"批量更新失败: {e}")\n',
|
||||||
|
' finally:\n',
|
||||||
|
' # 关闭连接\n',
|
||||||
|
' db.close(conn, cur)\n',
|
||||||
|
' except Exception as e:\n',
|
||||||
|
' logger.error(f"更新状态失败: {e}")\n',
|
||||||
|
' \n',
|
||||||
|
' # 发送更新完成信号\n',
|
||||||
|
' self.update_finished.emit(updated_count, update_data)\n',
|
||||||
|
'\n',
|
||||||
|
'\n'
|
||||||
|
]
|
||||||
|
|
||||||
|
# 替换UpdateThread类
|
||||||
|
new_lines = lines[:start_line] + new_update_thread + lines[end_line:]
|
||||||
|
|
||||||
|
# 写回文件
|
||||||
|
with open('G:\PyCode\domainScanDemo\app\ui\domain_filter.py', 'w', encoding='utf-8') as f:
|
||||||
|
f.writelines(new_lines)
|
||||||
|
|
||||||
|
print('UpdateThread class updated successfully')
|
||||||
|
else:
|
||||||
|
print('UpdateThread class not found')
|
||||||
Reference in New Issue
Block a user