Skip to content

Commit

Permalink
chore: remove result_sync in parse_link
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemo2011 committed Dec 23, 2024
1 parent 4a32fe6 commit 1448f17
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bilibili_api/utils/parse_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ async def parse_link(url: str, credential: Union[Credential, None] = None) -> Un
url = await get_real_url(str(url)) # type: ignore
url = URL(url) # type: ignore

fl_space = parse_space_favorite_list(url, credential) # type: ignore
fl_space = await parse_space_favorite_list(url, credential) # type: ignore
if fl_space != -1:
return fl_space # type: ignore
game = parse_game(url, credential) # type: ignore
Expand Down Expand Up @@ -487,7 +487,7 @@ def parse_season_series(url: URL, credential: Credential) -> Union[ChannelSeries
return -1


def parse_space_favorite_list(
async def parse_space_favorite_list(
url: URL, credential: Credential
) -> Union[
Tuple[FavoriteList, ResourceType], Tuple[ChannelSeries, ResourceType], Literal[-1]
Expand All @@ -501,10 +501,10 @@ def parse_space_favorite_list(
): # query 中不存在 fid 则返回默认收藏夹
api = get_api("favorite-list")["info"]["list_list"]
params = {"up_mid": uid, "type": 2}
favorite_lists = (
favorite_lists = await (
Api(**api, credential=credential)
.update_params(**params)
.result_sync
.result
)

if favorite_lists == None:
Expand Down

0 comments on commit 1448f17

Please sign in to comment.