Files
xkwsoftlistnew/config.py
2026-02-27 15:49:25 +08:00

32 lines
1.1 KiB
Python
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ===== 爬虫配置 =====
# 起始 ID
TOTAL_START_ID = 6000000
# 总线程数(决定 ID 分段数量)
THREAD_COUNT = 50
# 每个线程负责的 ID 数量
STEP = 1000000
# 指定只运行哪些线程(使用线程索引列表)
# 例如: [16, 17, 18, 19, 36, 37, 38, 39, 40] 表示只运行这些线程
# 设为 None 或空列表 [] 表示运行全部线程
ACTIVE_THREADS = [7,8,9,10,11,12,13,14,15,16, 17, 18, 19, 36, 37, 38, 39, 40]
#ACTIVE_THREADS = [16, 17, 18, 19, 36, 37, 38, 39, 40,41,42,43,44]
# ===== 目标数据库(将抓取到的数据入库到 MySQL =====
# MySQL 连接配置
DB_HOST = '192.168.0.164'
DB_PORT = 3307
DB_USER = 'root'
DB_PASSWORD = 'myP#ssw0rd'
DB_NAME = 'xkw'
DB_TABLE = 'xkwsoftlist'
# 指定只处理哪些 sqlite db 文件(对应线程索引)
# 例如: [7,8,9] 表示处理 softlist_7.db, softlist_8.db, softlist_9.db
# 设为 None 或空列表 [] 表示处理所有存在的 softlist_*.db
PROCESS_DB_THREADS = [16, 17, 18, 19, 36, 37, 38, 39, 40] # 默认与 ACTIVE_THREADS 相同;可改为 None 或自定义列表