douyinWEB/scripts/_probe_live_count_only.py
eric d409e416da Ship physical dual-edge stack, Studio CDP live metrics, and ops tooling.
Capture Neko/WG/network hubs, Studio viewer charts, physical deploy docs, and one-shot scripts so VPS vs physical can be toggled later without losing WIP.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-04 22:42:40 -05:00

19 lines
545 B
Python

# -*- coding: utf-8 -*-
import asyncio
import json
import sys
sys.path.insert(0, "/opt/douyinWEB/backend")
from app import youtube_live # noqa: E402
async def main():
p = await youtube_live.build_live_map(force=True)
print("live_count", p.get("live_count"))
for k, v in sorted((p.get("entries") or {}).items()):
if isinstance(v, dict) and v.get("is_live"):
print(k, "src=", v.get("source"), "title=", (v.get("title") or "")[:40], "detect=", (v.get("studio") or {}).get("detect_source"))
asyncio.run(main())