Skip to content

Commit

Permalink
Merge pull request #680 from Nickszy/fix--352-#595
Browse files Browse the repository at this point in the history
Fix  #595
  • Loading branch information
z0z0r4 authored Apr 5, 2024
2 parents 1b30afc + c7491de commit 4fb2ef3
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions bilibili_api/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import json
import random
import time
from enum import Enum
from typing import List, Union, Tuple
Expand Down Expand Up @@ -465,19 +466,20 @@ async def get_videos(
dict: 调用接口返回的内容。
"""
api = API["info"]["video"]
dm_rand = 'ABCDEFGHIJK'
params = {
"mid": self.__uid,
"ps": ps,
"tid": tid,
"pn": pn,
"keyword": keyword,
"order": order.value,
# -352 https://github.com/Nemo2011/bilibili-api/issues/595
# -352 https://github.com/Nemo2011/bilibili-api/issues/595 需要跟进
"dm_img_list": "[]", # 鼠标/键盘操作记录
# WebGL 1.0 (OpenGL ES 2.0 Chromium)
"dm_img_str": "V2ViR0wgMS4wIChPcGVuR0wgRVMgMi4wIENocm9taXVtKQ",
# ANGLE (Intel, Intel(R) UHD Graphics 630 (0x00003E9B) Direct3D11 vs_5_0 ps_5_0, D3D11)Google Inc. (Intel
"dm_cover_img_str": "QU5HTEUgKEludGVsLCBJbnRlbChSKSBVSEQgR3JhcGhpY3MgNjMwICgweDAwMDAzRTlCKSBEaXJlY3QzRDExIHZzXzVfMCBwc181XzAsIEQzRDExKUdvb2dsZSBJbmMuIChJbnRlbC",
'dm_img_str': ''.join(random.sample(dm_rand, 2)),
'dm_cover_img_str': ''.join(random.sample(dm_rand, 2)),
'dm_img_inter': '{"ds":[],"wh":[0,0,0],"of":[0,0,0]}',
'order_avoided': True
}
return (
await Api(**api, credential=self.credential).update_params(**params).result
Expand Down Expand Up @@ -1102,7 +1104,8 @@ async def edit_self_info(
credential.raise_for_no_bili_jct()

api = API["info"]["edit_my_info"]
data = {"birthday": birthday, "sex": sex, "uname": uname, "usersign": usersign}
data = {"birthday": birthday, "sex": sex,
"uname": uname, "usersign": usersign}

return await Api(**api, credential=credential).update_data(**data).result

Expand Down

0 comments on commit 4fb2ef3

Please sign in to comment.