Use dokobot to read web pages through a real Chrome browser, enabling JavaScript rendering for dynamic/SPA pages.
dokobot CLI installed globally: npm install -g @dokobot/clidokobot install-bridge (one-time setup)--local mode to workdokobot doko list
Shows connected browsers. If empty, open Chrome with the Dokobot extension.
dokobot read --local "<URL>" --timeout 60000
Reads a page through local Chrome. Wait for --timeout (default 30s) to let JS render.
For dynamic pages (JS-rendered data):
dokobot read --local "<URL>" --timeout 60000
Use --timeout 60000 (60s) for pages with heavy JS loading. For very slow pages, increase to 90000.
To continue a session (for paginated content):
dokobot read "<URL>" --session-id <SESSION_ID> --screens 5
dokobot doko close <SESSION_ID>
dokobot doko listdokobot read --local "" --timeout 60000 --timeout 60000 or higher. Pages like East Money (东方财富) data centers need 45-60 seconds to render.--session-id from previous read to continue| Site | URL Pattern | Notes |
|---|---|---|
| ------ | ------------- | ------- |
| 东方财富 行情中心 | https://quote.eastmoney.com/changes | 盘口异动,60s timeout |
| 东方财富 龙虎榜 | https://data.eastmoney.com/stock/lhb.html | 60s timeout |
| 东方财富 个股资金流向 | https://data.eastmoney.com/zjlx/ | CODE = stock code without market prefix |
| 东方财富 数据中心 | https://data.eastmoney.com/ | 60s timeout |
| Problem | Solution |
|---|---|
| --------- | ---------- |
| "No available devices" | Open Chrome with Dokobot extension enabled |
| "Bridge not running" | Run dokobot install-bridge |
| Data missing/incomplete | Increase --timeout to 90000 |
| Page shows "not found" | URL may have changed; search for correct URL |
| Read times out | Use longer --timeout or try again |
for ($i = 1; $i -le 6; $i++) {
Write-Host "=== 第${i}次刷新 $(Get-Date -Format 'HH:mm:ss') ==="
$result = dokobot read --local "<URL>" --timeout 60000 2>&1
# Parse relevant lines
if ($i -lt 6) { Start-Sleep -Seconds 30 }
}
dokobot read --local "https://data.eastmoney.com/stock/lhb.html" --timeout 60000
共 1 个版本