feat:add api
This commit is contained in:
parent
7489d6a912
commit
59fca63d4a
@ -22,6 +22,7 @@ class DoubanApi(metaclass=Singleton):
|
|||||||
# 聚合搜索
|
# 聚合搜索
|
||||||
"search": "/search/weixin",
|
"search": "/search/weixin",
|
||||||
"search_agg": "/search",
|
"search_agg": "/search",
|
||||||
|
"search_subject": "/search/subjects",
|
||||||
"imdbid": "/movie/imdb/%s",
|
"imdbid": "/movie/imdb/%s",
|
||||||
|
|
||||||
# 电影探索
|
# 电影探索
|
||||||
@ -274,6 +275,14 @@ class DoubanApi(metaclass=Singleton):
|
|||||||
return self.__invoke(self._urls["group_search"], q=keyword,
|
return self.__invoke(self._urls["group_search"], q=keyword,
|
||||||
start=start, count=count, _ts=ts)
|
start=start, count=count, _ts=ts)
|
||||||
|
|
||||||
|
def person_search(self, keyword: str, start: int = 0, count: int = 20,
|
||||||
|
ts=datetime.strftime(datetime.now(), '%Y%m%d')):
|
||||||
|
"""
|
||||||
|
人物搜索
|
||||||
|
"""
|
||||||
|
return self.__invoke(self._urls["search_subject"], type="person", q=keyword,
|
||||||
|
start=start, count=count, _ts=ts)
|
||||||
|
|
||||||
def movie_showing(self, start: int = 0, count: int = 20,
|
def movie_showing(self, start: int = 0, count: int = 20,
|
||||||
ts=datetime.strftime(datetime.now(), '%Y%m%d')):
|
ts=datetime.strftime(datetime.now(), '%Y%m%d')):
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user