Skip to content

Commit

Permalink
fix: Update:
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemo2011 committed Jul 15, 2022
1 parent aea5519 commit 73129ce
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bilibili_api/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
搜索
"""
from enum import Enum
import json
from .utils.utils import get_api
from .utils.network_httpx import request
from .utils.network_httpx import request, get_session

API = get_api("search")

Expand Down Expand Up @@ -84,4 +85,6 @@ async def get_hot_search_keywords():
调用 api 返回的结果
"""
api = API['search']['hot_search_keywords']
return await request("GET", api['url'])
sess = get_session()
return json.loads((await sess.request("GET", api['url'])).text)['cost']

0 comments on commit 73129ce

Please sign in to comment.