fix douban api

This commit is contained in:
jxxghp
2024-04-27 21:17:32 +08:00
parent 1718758d1c
commit 6a71bed821
4 changed files with 41 additions and 52 deletions

View File

@ -574,7 +574,7 @@ class DoubanModule(_ModuleBase):
'url': item.get('target', {}).get('url'),
'images': item.get('target', {}).get('cover', {}),
'avatar': item.get('target', {}).get('cover_img', {}).get('url'),
}) for item in result.get('items')]
}) for item in result.get('items') if name in item.get('target', {}).get('title')]
return []
@retry(Exception, 5, 3, 3, logger=logger)

View File

@ -181,7 +181,7 @@ class DoubanApi(metaclass=Singleton):
"""
req_url = self._base_url + url
params = {'apiKey': self._api_key}
params: dict = {'apiKey': self._api_key}
if kwargs:
params.update(kwargs)