From 1174b5cc7f8c8d1c67730f5658e0752cdb39895f Mon Sep 17 00:00:00 2001 From: Cinte Date: Sat, 17 Sep 2022 11:23:55 +0800 Subject: [PATCH] x --- plugins/bilibili_sub/utils.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/plugins/bilibili_sub/utils.py b/plugins/bilibili_sub/utils.py index da9bbb41..26c1166a 100755 --- a/plugins/bilibili_sub/utils.py +++ b/plugins/bilibili_sub/utils.py @@ -111,8 +111,16 @@ async def get_videos( } return await get(url, params=params, auth=auth, reqtype=reqtype, **kwargs) -async def get_user_card(mid, photo: bool = False): +async def get_user_card(mid, photo: bool = False, auth=None, reqtype="both", **kwargs): from bilireq.utils import get + url = f"{BASE_URL}/x/web-interface/card" - r = await get(url, params={"mid":mid, "photo": photo}) - return r["card"] + return ( + await get( + url, + params={"mid": mid, "photo": photo}, + auth=auth, + reqtype=reqtype, + **kwargs, + ) + )["card"]