Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
太白啊_ authored and 太白啊_ committed Jan 6, 2022
2 parents 800e35d + 2dc91ac commit eaa92a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion BiliClient/asyncBiliApi.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ async def xliveFansMedal(self,
page int 页码
pageSize int 字体颜色
'''
url = f'https://api.live.bilibili.com/fans_medal/v5/live_fans_medal/iApiMedal?page={page}&pageSize={pageSize}'
url = f'https://api.live.bilibili.com/xlive/app-ucenter/v1/user/GetMyMedals?page={page}&page_size={pageSize}'
async with self._session.get(url, verify_ssl=False) as r:
return await r.json()

Expand Down
6 changes: 3 additions & 3 deletions tasks/xlive_heartbeat_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ async def get_rooms(biliapi: asyncbili) -> Awaitable[List[int]]:
break
else:
if ret["code"] == 0:
if not ret["data"]["fansMedalList"]:
if not ret["data"]["items"]:
break
for medal in ret["data"]["fansMedalList"]:
for medal in ret["data"]["items"]:
if 'roomid' in medal:
result.append(medal["roomid"])
else:
Expand Down Expand Up @@ -187,4 +187,4 @@ async def xliveHeartBeatLoop(biliapi: asyncbili,
yield 0, interval
else:
yield ret["code"], ret["message"]
break
break

0 comments on commit eaa92a0

Please sign in to comment.