31 lines
831 B
Python
31 lines
831 B
Python
#!/usr/bin/env python3
|
|
"""Verify Google Trends MCP is functional — just tests import + RSS path (fast, no browser)."""
|
|
|
|
import json
|
|
import sys
|
|
|
|
|
|
def check() -> dict:
|
|
"""Verify trendspyg import and RSS download."""
|
|
try:
|
|
import trendspyg
|
|
except ImportError as e:
|
|
return {"ok": False, "message": f"trendspyg not installed: {e}"}
|
|
|
|
v = getattr(trendspyg, "__version__", "unknown")
|
|
return {
|
|
"ok": True,
|
|
"message": f"trendspyg v{v} — Google Trends MCP is ready",
|
|
"details": {
|
|
"version": v,
|
|
"rss_path": "available (no browser needed)",
|
|
"explore_path": "available (requires Chrome/Selenium)",
|
|
},
|
|
}
|
|
|
|
|
|
if __name__ == "__main__":
|
|
result = check()
|
|
sys.stdout.write(json.dumps(result))
|
|
sys.exit(0 if result["ok"] else 1)
|