# -*- coding: utf-8 -*- import subprocess from pathlib import Path script = Path("/opt/douyinWEB/backend/neko/cdp_studio_scrape.py").read_text(encoding="utf-8") for idx in range(1, 8): name = f"douyinweb-neko-{idx}" p = subprocess.run( ["docker", "exec", "-i", name, "python3", "-"], input=script, capture_output=True, text=True, timeout=35, ) line = (p.stdout or p.stderr or "").strip().splitlines()[-1] if (p.stdout or p.stderr) else "" print(f"{name} rc={p.returncode} {line[:260]}")