route-B = 盯你关注的「已 DM 过≥1 天没回的高/中意向 lead」,谁发了 20 分钟内的新视频,就去他视频下点赞 + 发两条评论(评论2 顺带把产品话术带出去),做一次不打扰的二次勾。
浏览器版把执行器从「抖音 PC 客户端 + 截图 AI 坐标」换成「隐形 Edge + DOM」:_aweme_id 拼 URL 直达视频(不搜昵称、无身份门误杀),零坐标零校准。它和 DM 首触、DM 自动回复共用同一个 Edge,靠窗口锁串行——优先级:自动回复 > DM 首触 > route-B(DM 一有单,route-B 当前这条发完就让位)。
| 三条常驻腿 | 干什么 |
|---|---|
| poll agent(原有) | DM 首触 + 自动回复捕获/发送 |
| routeB-watch | 只读 API 盯关注流,命中新视频写队列(不碰页面) |
| routeB-consume | 读队列 → 调浏览器三连执行器发(碰页面,受窗口锁约束) |
抖音 PC 版都没配过二触/route-B。要多做一步「建引导记录 + 等灌池」。
PC 版二触/route-B 跑过、池子和 cookie 都现成。纯换执行器,最快。
C:\akke-wuying\wuying-dm\;.env 里有 AKKE_ACCOUNT_ID(本机号)。下面是一条命令(分号连接,整段粘贴不怕断行):
Get-Process python,py,pythonw -ErrorAction SilentlyContinue | Stop-Process -Force; cd C:\akke-wuying\wuying-dm; $b='https://cdn.jsdelivr.net/gh/upioai/wiki@19d2740269bdb870feedd00a24ef02ff2a93312d/public/akke/wuying-dm'; foreach($f in 'douyin_touch_web_dom.py','_realtime_touch_watch_wuying.py','_realtime_touch_consume_wuying.py'){ Copy-Item $f "$f.bak" -Force -EA 0; curl.exe -fsS --retry 5 --retry-delay 2 --connect-timeout 15 -o $f "$b/$f"; '{0,-34} {1}' -f $f,(Get-Item $f).Length }
核对字节数:douyin_touch_web_dom.py = 14458/_realtime_touch_watch_wuying.py = 16807/_realtime_touch_consume_wuying.py = 32904。(jsDelivr 若报 403/连不上,把 URL 里 cdn.jsdelivr.net/gh/upioai/wiki@<SHA> 换成 raw.githubusercontent.com/upioai/wiki/main 再试。)
Add-Content .env "AKKE_WINDOW_LOCK=1" -Encoding UTF8 Get-Content .env | Select-String 'WINDOW_LOCK|ACCOUNT_ID'
要看到 AKKE_WINDOW_LOCK=1 + AKKE_ACCOUNT_ID=<本机号>。
py -u wuying_poll_agent.py
横幅有 v=2026-07-03+reply-priority + 本机 account。此窗保持开着。
second_touch_state 里有记录的)。新号不在里面 → 池子恒为 0 → watch 侦测不到人。得先插一条引导记录破这个「先有鸡还是蛋」。second_touch_state)。之后下一个整点 cron 自动把该号 100+ 条「发出≥1天没回」lead 灌进 monitored_targets。各开一个新 PowerShell 窗口(别关 poll agent 那个):
# 窗口1 · watch(侦测,只读 API)
cd C:\akke-wuying\wuying-dm; py _realtime_touch_watch_wuying.py --cookie-file dy_cookie.txt --max-age-min 20 --interval-sec 60
# 窗口2 · consume(消费·浏览器 DOM)
cd C:\akke-wuying\wuying-dm; py _realtime_touch_consume_wuying.py --comment-script douyin_touch_web_dom.py --db
lead池 N。管理员建了引导记录、且过了整点后,N 应该 >0(该号发过 DM 的量)。N=0 且还没到整点=正常,等下个整点;N=0 且过了整点=管理员那步没做或该号确实没有≥1天没回的 lead,回报管理员。dy_cookie.txt(关注流签名)、monitored_targets 池子(DB 里已有,PC 版一直在用)、话术表、second_touch_state(已在灌池范围)。只差一件:把执行器从 PC 版换成浏览器版。关掉正在跑 PC 版 route-B 的那些窗口(跑 douyin_comment_grounded.py 的 consume / 二触批),poll agent 可留着(DM 用)。
Get-Process python,py,pythonw -ErrorAction SilentlyContinue | Stop-Process -Force; cd C:\akke-wuying\wuying-dm; $b='https://cdn.jsdelivr.net/gh/upioai/wiki@19d2740269bdb870feedd00a24ef02ff2a93312d/public/akke/wuying-dm'; foreach($f in 'douyin_touch_web_dom.py','_realtime_touch_watch_wuying.py','_realtime_touch_consume_wuying.py'){ Copy-Item $f "$f.bak" -Force -EA 0; curl.exe -fsS --retry 5 --retry-delay 2 --connect-timeout 15 -o $f "$b/$f"; '{0,-34} {1}' -f $f,(Get-Item $f).Length }
Add-Content .env "AKKE_WINDOW_LOCK=1" -Encoding UTF8
核对:14458 / 16807 / 32904。
# poll agent(DM,吃锁)
cd C:\akke-wuying\wuying-dm; py -u wuying_poll_agent.py
# 新窗1 · watch
cd C:\akke-wuying\wuying-dm; py _realtime_touch_watch_wuying.py --cookie-file dy_cookie.txt --max-age-min 20 --interval-sec 60
# 新窗2 · consume(浏览器 DOM)
cd C:\akke-wuying\wuying-dm; py _realtime_touch_consume_wuying.py --comment-script douyin_touch_web_dom.py --db
lead池 >0(PC 版一直在用的池子),关键区别只是 --comment-script douyin_touch_web_dom.py——从此三连走 Edge DOM 而非 PC GUI。本地生成 start-routeb.bat,以后双击就弹 watch+consume 两窗(一条命令):
cd C:\akke-wuying\wuying-dm; Set-Content -Path start-routeb.bat -Encoding ASCII -Value @('@echo off','cd /d C:\akke-wuying\wuying-dm','start "routeB-watch" cmd /k "py _realtime_touch_watch_wuying.py --cookie-file dy_cookie.txt --max-age-min 20 --interval-sec 60"','timeout /t 3 /nobreak >nul','start "routeB-consume" cmd /k "py _realtime_touch_consume_wuying.py --comment-script douyin_touch_web_dom.py --db"','pause')
| 现象 | 含义 / 处理 |
|---|---|
watch lead池 0 | A:管理员没建引导记录 / 没到整点;B:不该出现,检查是不是换了号 |
watch 报 401 / 签名失败 / cookie | dy_cookie.txt 过期(15–30 天)→ 找管理员重新摆渡一份新 cookie |
| watch 长期 0 命中但无报错 | 正常——池里的人当下没发新视频。有人发了 20min 内新视频才命中 |
consume 里三连出 unverified | 评论大概率已发出、只是验证没读到,不会重发;偶发不用管 |
| DM 和 route-B 会不会抢窗口 | 不会——AKKE_WINDOW_LOCK=1 串行,DM 一有单 route-B 当前这条发完就让位 |
start-routeb.bat。