# -*- coding: utf-8 -*- import sys import json import httpx import paramiko from urllib.parse import urlparse, parse_qs, unquote sys.stdout.reconfigure(encoding="utf-8", errors="replace") g = paramiko.SSHClient() g.set_missing_host_key_policy(paramiko.AutoAddPolicy()) g.connect("107.173.30.245", 4014, "eric", "4669805", timeout=40, banner_timeout=80, allow_agent=False, look_for_keys=False) # recent callbacks + channel state + add temporary logging tip via python inspect last errors cmd = r"""echo '4669805' | sudo -S -p '' bash -lc ' journalctl -u douyinweb-api --since "45 min ago" --no-pager -o short-iso 2>/dev/null | grep -iE "oauth|shorts" | tail -60 echo ==== cd /opt/douyinWEB/backend && .venv/bin/python - <