Merge pull request #1606 from thsrite/main
This commit is contained in:
commit
0f09da55b0
@ -43,7 +43,8 @@ class TheMovieDbModule(_ModuleBase):
|
|||||||
"""
|
"""
|
||||||
测试模块连接性
|
测试模块连接性
|
||||||
"""
|
"""
|
||||||
ret = RequestUtils().get_res(f"https://{settings.TMDB_API_DOMAIN}/3/movie/550?api_key={settings.TMDB_API_KEY}")
|
ret = RequestUtils(proxies=settings.PROXY).get_res(
|
||||||
|
f"https://{settings.TMDB_API_DOMAIN}/3/movie/550?api_key={settings.TMDB_API_KEY}")
|
||||||
if ret and ret.status_code == 200:
|
if ret and ret.status_code == 200:
|
||||||
return True, ""
|
return True, ""
|
||||||
elif ret:
|
elif ret:
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
from typing import Optional, Tuple, Union
|
from typing import Optional, Tuple, Union
|
||||||
|
|
||||||
|
|
||||||
from app.core.config import settings
|
from app.core.config import settings
|
||||||
from app.log import logger
|
from app.log import logger
|
||||||
from app.modules import _ModuleBase
|
from app.modules import _ModuleBase
|
||||||
@ -9,7 +8,6 @@ from app.utils.http import RequestUtils
|
|||||||
|
|
||||||
|
|
||||||
class TheTvDbModule(_ModuleBase):
|
class TheTvDbModule(_ModuleBase):
|
||||||
|
|
||||||
tvdb: tvdbapi.Tvdb = None
|
tvdb: tvdbapi.Tvdb = None
|
||||||
|
|
||||||
def init_module(self) -> None:
|
def init_module(self) -> None:
|
||||||
@ -25,7 +23,7 @@ class TheTvDbModule(_ModuleBase):
|
|||||||
"""
|
"""
|
||||||
测试模块连接性
|
测试模块连接性
|
||||||
"""
|
"""
|
||||||
ret = RequestUtils().get_res("https://api.thetvdb.com/series/81189")
|
ret = RequestUtils(proxies=settings.PROXY).get_res("https://api.thetvdb.com/series/81189")
|
||||||
if ret and ret.status_code == 200:
|
if ret and ret.status_code == 200:
|
||||||
return True, ""
|
return True, ""
|
||||||
elif ret:
|
elif ret:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user