mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-02-12 23:07:05 +08:00
14 lines
413 B
Python
14 lines
413 B
Python
import requests
|
|
|
|
from module.conf import settings
|
|
|
|
|
|
class PostNotification:
|
|
def __init__(self):
|
|
self.token = settings.notification_token
|
|
self.notification_url = lambda message: f"https://api.pushbullet.com/v2/{self.token}/{message}"
|
|
|
|
def ifttt_post(self, message):
|
|
url = self.notification_url(message)
|
|
response = requests.get(url)
|
|
return response.status_code == 200 |