We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d38b45 commit 47717c1Copy full SHA for 47717c1
.gitignore
@@ -129,3 +129,4 @@ dmypy.json
129
.pyre/
130
131
/.idea
132
+.vscode/settings.json
sendIP.py
100644
100755
@@ -1,15 +1,17 @@
1
#!/usr/bin/env python3
2
# Copyright (c) 2022. 楊鵬. All Rights Reserved.
3
+import os
4
import socket
5
6
import requests
7
+from dotenv import load_dotenv
8
9
+load_dotenv()
10
URL = "https://notify-api.line.me/api/notify"
-TOKEN = "mCfw9Yzf8MsXuW2caAPYOkNl7nSewwYppdmV97VRWn6"
11
12
13
def sendIP(ip: str):
- headers = {"Authorization": "Bearer " + TOKEN}
14
+ headers = {"Authorization": "Bearer " + os.environ["TOKEN"]}
15
params = {"message": ip}
16
r = requests.post(URL, headers=headers, params=params)
17
print(r.text)
0 commit comments