diff --git a/module/core/renamer.py b/module/core/renamer.py index bd31f99e..7cd681f2 100644 --- a/module/core/renamer.py +++ b/module/core/renamer.py @@ -8,7 +8,7 @@ from .download_client import DownloadClient from module.conf import settings from module.parser import TitleParser -from ..network import PostNotification, FtqqNotification +from ..network import PostNotification, ServerChanNotification logger = logging.getLogger(__name__) @@ -54,7 +54,7 @@ class Renamer: return path_name, season, folder_name, suffix, download_path def run(self): - notification = FtqqNotification() + notification = ServerChanNotification() recent_info, torrent_count = self.get_torrent_info() rename_count = 0 for info in recent_info: diff --git a/module/network/__init__.py b/module/network/__init__.py index 326efdf1..d4589016 100644 --- a/module/network/__init__.py +++ b/module/network/__init__.py @@ -1,2 +1,2 @@ from .request_contents import RequestContent -from .notification import PostNotification, FtqqNotification +from .notification import PostNotification, ServerChanNotification diff --git a/module/network/notification.py b/module/network/notification.py index 75dc141c..1c0bb119 100644 --- a/module/network/notification.py +++ b/module/network/notification.py @@ -19,7 +19,7 @@ class PostNotification: return response.status_code == 200 -class FtqqNotification: +class ServerChanNotification: """Server酱推送""" def __init__(self): @@ -35,12 +35,12 @@ class FtqqNotification: resp = requests.post(self.notification_url, json=data, timeout=3) resp.raise_for_status() except requests.RequestException as e: - logging.error("[FtqqNotification] send fail, error: %s" % e) + logging.error("[ServerChanNotification] send fail, error: %s" % e) return False return True if __name__ == '__main__': name = "勇者、辞职不干了" - notification = FtqqNotification() + notification = ServerChanNotification() notification.send_msg(f"《{name[:10]}》缓存成功", f"[Auto Bangumi]《{name}》缓存成功")