publish eve_orehold_watcher.py

This commit is contained in:
brockdarnold 2026-06-15 00:27:01 +00:00
parent 273e60f0f3
commit b9763ebe4c

View file

@ -195,7 +195,8 @@ def _discord(cp, title, message):
try:
req = urllib.request.Request(
webhook, data=payload.encode("utf-8"),
headers={"Content-Type": "application/json"}, method="POST")
headers={"Content-Type": "application/json", "User-Agent": "eve-watcher"},
method="POST") # Discord 403s a missing/blank User-Agent — must set one
with urllib.request.urlopen(req, timeout=10) as r:
r.read()
print("[discord] sent")