5d60d33db1
Volledige Foodlinkk Command Center uitbreiding met social automatisering, reclamefolder filters, Proxmox monitoring en documentatie.
16 lines
485 B
Python
16 lines
485 B
Python
#!/usr/bin/env python3
|
|
"""Nightly research + recommendations refresh."""
|
|
import json
|
|
import urllib.request
|
|
|
|
TOOLS = "http://10.4.7.18:8700"
|
|
|
|
def post(path):
|
|
req = urllib.request.Request(f"{TOOLS}{path}", method="POST", headers={"Content-Length": "0"})
|
|
with urllib.request.urlopen(req, timeout=120) as r:
|
|
return json.loads(r.read())
|
|
|
|
if __name__ == "__main__":
|
|
print("research", post("/research/run"))
|
|
print("recommendations", post("/recommendations/generate"))
|