mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Merge pull request #41 from Final-Hawk/patch-2
Fix Pushsafer Support and Duplicate NTFY Messages
This commit is contained in:
@@ -1377,11 +1377,6 @@ def email_reporting ():
|
|||||||
send_pushsafer (mail_text)
|
send_pushsafer (mail_text)
|
||||||
else :
|
else :
|
||||||
print (' Skip PUSHSAFER...')
|
print (' Skip PUSHSAFER...')
|
||||||
if REPORT_NTFY :
|
|
||||||
print (' Sending report by NTFY...')
|
|
||||||
send_ntfy (mail_text)
|
|
||||||
else :
|
|
||||||
print (' Skip NTFY...')
|
|
||||||
else :
|
else :
|
||||||
print (' No changes to report...')
|
print (' No changes to report...')
|
||||||
|
|
||||||
@@ -1426,10 +1421,8 @@ def send_pushsafer (_Text):
|
|||||||
"ut" : 'Open Pi.Alert',
|
"ut" : 'Open Pi.Alert',
|
||||||
"k" : PUSHSAFER_TOKEN,
|
"k" : PUSHSAFER_TOKEN,
|
||||||
}
|
}
|
||||||
|
requests.post(url, data=post_fields)
|
||||||
|
|
||||||
request = Request(url, urlencode(post_fields).encode())
|
|
||||||
json = urlopen(request).read().decode()
|
|
||||||
# print(json)
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user