douyinWEB/scripts/_find_neko_profile.py
2026-09-13 22:10:49 -05:00

23 lines
813 B
Python

# -*- coding: utf-8 -*-
import paramiko
c = paramiko.SSHClient()
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
c.connect("107.173.30.245", 22, "root", "Xiao4669805", timeout=30, allow_agent=False, look_for_keys=False)
cmd = r'''
docker inspect douyinweb-neko-12 --format '{{range .Mounts}}{{.Source}} -> {{.Destination}}{{println}}{{end}}' | grep -iE 'chrome|chromium|profile'
echo '---'
find /opt/douyinWEB -maxdepth 4 -type d -name 'profiles' 2>/dev/null
ls -la /var/lib/douyinweb-neko 2>/dev/null | head
python3 - <<'PY'
import sys
sys.path.insert(0,'/opt/douyinWEB/backend')
from app import youtube_neko
print('neko_root', youtube_neko._neko_root())
print('profile12', youtube_neko._ensure_profile(12))
PY
'''
_, o, e = c.exec_command(cmd, timeout=30)
print((o.read()+e.read()).decode())
c.close()