fix bug
This commit is contained in:
parent
884a0feb62
commit
1ecbc2f0be
@ -417,10 +417,12 @@ class DoubanModule(_ModuleBase):
|
||||
"""
|
||||
if imdbid:
|
||||
# 优先使用IMDBID查询
|
||||
logger.info(f"开始使用IMDBID {imdbid} 查询豆瓣信息 ...")
|
||||
result = self.doubanapi.imdbid(imdbid)
|
||||
if result:
|
||||
return result
|
||||
# 搜索
|
||||
logger.info(f"开始使用名称 {name} 查询豆瓣信息 ...")
|
||||
result = self.doubanapi.search(f"{name} {year or ''}".strip())
|
||||
if not result:
|
||||
logger.warn(f"未找到 {name} 的豆瓣信息")
|
||||
|
@ -214,13 +214,14 @@ class DoubanApi(metaclass=Singleton):
|
||||
)
|
||||
"""
|
||||
req_url = self._api_url + url
|
||||
params = {'apiKey': self._api_key2}
|
||||
params = {'apikey': self._api_key2}
|
||||
if kwargs:
|
||||
params.update(kwargs)
|
||||
if '_ts' in params:
|
||||
params.pop('_ts')
|
||||
resp = RequestUtils(
|
||||
session=self._session
|
||||
ua=settings.USER_AGENT,
|
||||
session=self._session,
|
||||
).post_res(url=req_url, data=params)
|
||||
if resp.status_code == 400 and "rate_limit" in resp.text:
|
||||
return resp.json()
|
||||
|
Loading…
x
Reference in New Issue
Block a user