From 5b2fa9a6722ad422116aeb71c1c1788270f92e38 Mon Sep 17 00:00:00 2001 From: yjqiang Date: Thu, 28 Mar 2019 11:30:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=AD=A3=E5=9C=A8=E4=BD=A9?= =?UTF-8?q?=E6=88=B4=E7=9A=84=E5=8B=8B=E7=AB=A0=E4=B8=8D=E9=9C=80=E8=A6=81?= =?UTF-8?q?cookie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reqs/live_daily_job.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/reqs/live_daily_job.py b/reqs/live_daily_job.py index 93fa4e6..df4d63d 100644 --- a/reqs/live_daily_job.py +++ b/reqs/live_daily_job.py @@ -96,9 +96,12 @@ async def fetch_gift_config(user): @staticmethod async def fetch_wearing_medal(user): - # 这里取巧,抓包是post,觉得有点2,测试一下get也行,而且参数少 url = f'{API_LIVE}/live_user/v1/UserInfo/get_weared_medal' - json_rsp = await user.bililive_session.request_json('GET', url, headers=user.dict_bili['pcheaders'], ctrl=ReqCtrl.fetch_wearing_medal_ctrl) + data = { + 'uid': user.dict_bili['uid'], + 'csrf_token': '' + } + json_rsp = await user.bililive_session.request_json('POST', url, data=data, ctrl=ReqCtrl.fetch_wearing_medal_ctrl) return json_rsp @@ -117,7 +120,6 @@ async def silver2coin_web(user): class ReqCtrl: fetch_wearing_medal_ctrl = Ctrl( BaseCtrl( - logout_verifiers=[CtrlElem(code=1, others=[In('msg', 'params')])], ok_verifiers=[ CtrlElem(code=0), ]))