Skip to content

Commit

Permalink
查询正在佩戴的勋章不需要cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
yjqiang committed Mar 28, 2019
1 parent 46ee3a1 commit 5b2fa9a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions reqs/live_daily_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand All @@ -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),
]))

0 comments on commit 5b2fa9a

Please sign in to comment.