diff --git a/info.yaml b/info.yaml index 3c80408..08e8623 100644 --- a/info.yaml +++ b/info.yaml @@ -1,5 +1,5 @@ title: "애니 다운로더" -version: "0.6.1" +version: "0.6.2" package_name: "anime_downloader" developer: "projectdx" description: "anime downloader" diff --git a/mod_anilife.py b/mod_anilife.py index 557d6ca..d225bff 100644 --- a/mod_anilife.py +++ b/mod_anilife.py @@ -81,6 +81,7 @@ class LogicAniLife(AnimeModuleBase): db_default = { "anilife_db_version": "1", "anilife_url": "https://anilife.live", + "anilife_proxy_url": "", "anilife_download_path": os.path.join(path_data, P.package_name, "ohli24"), "anilife_auto_make_folder": "True", "anilife_auto_make_season_folder": "True", @@ -100,6 +101,17 @@ class LogicAniLife(AnimeModuleBase): "anilife_camoufox_installed": "False", } + @classmethod + def get_proxy(cls) -> str: + return P.ModelSetting.get("anilife_proxy_url") + + @classmethod + def get_proxies(cls) -> Optional[Dict[str, str]]: + proxy = cls.get_proxy() + if proxy: + return {"http": proxy, "https": proxy} + return None + current_headers = None current_data = None referer = None diff --git a/templates/anime_downloader_anilife_setting.html b/templates/anime_downloader_anilife_setting.html index 2371cda..8879ae3 100644 --- a/templates/anime_downloader_anilife_setting.html +++ b/templates/anime_downloader_anilife_setting.html @@ -25,7 +25,7 @@