publish eve_orehold_watcher.py
This commit is contained in:
parent
273e60f0f3
commit
b9763ebe4c
1 changed files with 2 additions and 1 deletions
|
|
@ -195,7 +195,8 @@ def _discord(cp, title, message):
|
||||||
try:
|
try:
|
||||||
req = urllib.request.Request(
|
req = urllib.request.Request(
|
||||||
webhook, data=payload.encode("utf-8"),
|
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:
|
with urllib.request.urlopen(req, timeout=10) as r:
|
||||||
r.read()
|
r.read()
|
||||||
print("[discord] sent")
|
print("[discord] sent")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue