commit
This commit is contained in:
66
backend/config.dev.yaml
Normal file
66
backend/config.dev.yaml
Normal file
@@ -0,0 +1,66 @@
|
||||
# 小红书Python服务配置 - 开发环境
|
||||
|
||||
# ========== 服务配置 ==========
|
||||
server:
|
||||
host: "0.0.0.0"
|
||||
port: 8000
|
||||
debug: true
|
||||
reload: false # Windows环境不建议启用热重载
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database:
|
||||
host: localhost
|
||||
port: 3306
|
||||
username: root
|
||||
password: JKjk20011115
|
||||
dbname: ai_wht
|
||||
charset: utf8mb4
|
||||
max_connections: 10
|
||||
min_connections: 2
|
||||
|
||||
# ========== 浏览器池配置 ==========
|
||||
browser_pool:
|
||||
idle_timeout: 1800 # 空闲超时(秒),已禁用自动清理,保持常驻
|
||||
max_instances: 5 # 最大浏览器实例数
|
||||
preheat_enabled: true # 是否启用预热
|
||||
preheat_url: "https://creator.xiaohongshu.com/login" # 预热URL(根据login.page自动调整)
|
||||
|
||||
# ========== 登录/绑定功能配置 ==========
|
||||
login:
|
||||
headless: false # 登录/绑定时的浏览器模式: false=有头模式(方便用户操作),true=无头模式
|
||||
page: "home" # 登录页面类型: creator=创作者中心(creator.xiaohongshu.com/login), home=小红书首页(www.xiaohongshu.com)
|
||||
|
||||
# ========== 定时发布调度器配置 ==========
|
||||
scheduler:
|
||||
enabled: true # 是否启用定时任务
|
||||
cron: "*/5 * * * * *" # Cron表达式(秒 分 时 日 月 周) - 每5秒执行一次(开发环境测试)
|
||||
max_concurrent: 2 # 最大并发发布数
|
||||
publish_timeout: 300 # 发布超时时间(秒)
|
||||
max_articles_per_user_per_run: 2 # 每轮每个用户最大发文数
|
||||
max_failures_per_user_per_run: 3 # 每轮每个用户最大失败次数(达到后暂停本轮后续发布)
|
||||
max_daily_articles_per_user: 6 # 每个用户每日最大发文数(自动发布)
|
||||
max_hourly_articles_per_user: 2 # 每个用户每小时最大发文数(自动发布)
|
||||
headless: false # 浏览器模式: false=有头模式(可调试),true=无头模式(生产环境)
|
||||
|
||||
# ========== 防封策略配置 ==========
|
||||
enable_random_ua: true # 启用随机User-Agent(防指纹识别)
|
||||
min_publish_interval: 30 # 最小发布间隔(秒),模拟真人行为
|
||||
max_publish_interval: 120 # 最大发布间隔(秒),模拟真人行为
|
||||
|
||||
# ========== 代理池配置 ==========
|
||||
proxy_pool:
|
||||
enabled: false # 默认关闭,按需开启
|
||||
api_url: "http://api.tianqiip.com/getip?secret=lu29e593&num=1&type=txt&port=1&mr=1&sign=4b81a62eaed89ba802a8f34053e2c964"
|
||||
|
||||
# ========== 阿里云短信配置 ==========
|
||||
ali_sms:
|
||||
access_key_id: "LTAI5tSMvnCJdqkZtCVWgh8R" # 从环境变量或配置文件读取
|
||||
access_key_secret: "nyFzXyIi47peVLK4wR2qqbPezmU79W" # 从环境变量或配置文件读取
|
||||
sign_name: "北京乐航时代科技" # 短信签名
|
||||
template_code: "SMS_486210104" # 短信模板CODE
|
||||
code_expire_minutes: 5 # 验证码有效期(分钟)
|
||||
|
||||
# ========== 日志配置 ==========
|
||||
logging:
|
||||
level: DEBUG
|
||||
format: "[%(asctime)s] [%(levelname)s] %(message)s"
|
||||
Reference in New Issue
Block a user