Use proxy for discord
This commit is contained in:
1 file changed
+2
-1
+2
-1
@@ -9,7 +9,8 @@ def send(_msg: str):
|
||||
r = requests.post(
|
||||
url=os.environ['DISCORD_WEBHOOK'],
|
||||
data=f'content=```diff\n{requests.utils.quote(_msg)}```'.encode('utf-8'),
|
||||
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
|
||||
headers = {'Content-Type': 'application/x-www-form-urlencoded'},
|
||||
proxies={"https": "http://localhost:1080"}
|
||||
)
|
||||
try:
|
||||
r.raise_for_status()
|
||||
|
||||
Reference in new issue
Block a user