diff --git a/notify.py b/notify.py index 04c2e98..1dee327 100644 --- a/notify.py +++ b/notify.py @@ -54,6 +54,14 @@ except requests.exceptions.RequestException: if not response.status_code == 200: print('HTTP Request failed, status code: ', response.status_code) + # 发送 bark 通知 + requests.post( + url="http://bark.tunpok.com/UZ6zC82bKRjQaXiVkosVWh", + params={ + "title": "chd 通知: HTTP " + response.status_code, + 'group': 'pt-msg', + }, + ) exit(1) soup = bs4.BeautifulSoup(response.text, 'html.parser')