forked from rabbit2rabbit/bili2.0
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
35 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
import utils | ||
from bili_global import API_LIVE | ||
|
||
|
||
class BuyLatiaoReq: | ||
# 其实与utils部分差不多,怀疑可能是新旧api | ||
@staticmethod | ||
async def fetch_livebili_userinfo_pc(user): | ||
url = f'{API_LIVE}/xlive/web-ucenter/user/get_user_info' | ||
json_rsp = await user.bililive_session.request_json('GET', url, headers=user.dict_bili['pcheaders']) | ||
return json_rsp | ||
|
||
|
||
class BuyMedalReq: | ||
@staticmethod | ||
async def buy_medal(user, uid, coin_type): | ||
url = f'https://api.vc.bilibili.com/link_group/v1/member/buy_medal?coin_type={coin_type}&master_uid={uid}&platform=android' | ||
json_rsp = await user.other_session.request_json('GET', url, headers=user.dict_bili['pcheaders']) | ||
return json_rsp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters