You've already forked XiguaLiveDanmakuHelper
添加搜索功能[Beta]
Update ReadMe.md Signed-off-by: Jerry Yan <792602257@qq.com>
This commit is contained in:
11
README.md
11
README.md
@ -1,12 +1,15 @@
|
|||||||
# XiguaLiveDanmakuHelper
|
# XiguaLiveDanmakuHelper
|
||||||
### 西瓜直播弹幕助手
|
### 西瓜直播弹幕助手--控制台版
|
||||||
|
|
||||||
因个人能力有限,不懂C#,无法做出界面版,只好用控制台版先顶着
|
界面版:[q792602257/XiguaDanmakuHelperGUI](https://github.com/q792602257/XiguaDanmakuHelperGUI "C# ver")
|
||||||
|
|
||||||
### 计划更新:
|
### 计划更新:
|
||||||
+ √ 使用android app协议
|
+ √ ~~使用android app协议~~
|
||||||
|
|
||||||
|
已使用
|
||||||
除从用户ID获取roomID及判断是否在播外,其他均改为Android Api
|
除从用户ID获取roomID及判断是否在播外,其他均改为Android Api
|
||||||
- √ 闲的无聊的时候看一看有没有好用的GUI轮子可以用用
|
|
||||||
|
|
||||||
|
+ √ ~~闲的无聊的时候看一看有没有好用的GUI轮子可以用用~~
|
||||||
|
|
||||||
|
已完成
|
||||||
已基于BiliLive_dm制作出初代西瓜直播弹幕姬,api未跟进
|
已基于BiliLive_dm制作出初代西瓜直播弹幕姬,api未跟进
|
||||||
|
21
api.py
21
api.py
@ -83,6 +83,19 @@ class XiGuaLiveApi:
|
|||||||
if DEBUG:
|
if DEBUG:
|
||||||
print(p.text)
|
print(p.text)
|
||||||
|
|
||||||
|
def searchLive(self, keyword):
|
||||||
|
ret = []
|
||||||
|
p = s.get("https://security.snssdk.com/video/app/search/live/?version_code=730&device_platform=android"
|
||||||
|
"&format=json&keyword={}".format(keyword))
|
||||||
|
d = p.json()
|
||||||
|
if "data" not in d:
|
||||||
|
for i in d["data"]:
|
||||||
|
if i["block_type"] != 2:
|
||||||
|
continue
|
||||||
|
for _i in i["cells"]:
|
||||||
|
ret.append(_i["room"])
|
||||||
|
return ret
|
||||||
|
|
||||||
def updRoomInfo(self):
|
def updRoomInfo(self):
|
||||||
p = s.get("https://live.ixigua.com/api/room?anchorId={room}".format(room=self.room))
|
p = s.get("https://live.ixigua.com/api/room?anchorId={room}".format(room=self.room))
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
@ -105,8 +118,8 @@ class XiGuaLiveApi:
|
|||||||
def getDanmaku(self):
|
def getDanmaku(self):
|
||||||
if not self.isValidRoom:
|
if not self.isValidRoom:
|
||||||
return
|
return
|
||||||
p = s.get("https://i.snssdk.com/videolive/im/get_msg?cursor={cursor}&room_id={roomID}&version_code=730"
|
p = s.get("https://i.snssdk.com/videolive/im/get_msg?cursor={cursor}&room_id={roomID}"
|
||||||
"&device_platform=android".format(
|
"&version_code=730&device_platform=android".format(
|
||||||
roomID=self.roomID,
|
roomID=self.roomID,
|
||||||
cursor=self._cursor
|
cursor=self._cursor
|
||||||
))
|
))
|
||||||
@ -155,10 +168,6 @@ if __name__ == "__main__":
|
|||||||
room = 97621754276 # 永恒
|
room = 97621754276 # 永恒
|
||||||
# room = 75366565294
|
# room = 75366565294
|
||||||
# room = 83940182312 #Dae
|
# room = 83940182312 #Dae
|
||||||
<<<<<<< HEAD
|
|
||||||
# room = 58649240617 #ll
|
|
||||||
=======
|
|
||||||
>>>>>>> f7727a3c3962342c753890954a25cbe05c113cf9
|
|
||||||
if len(sys.argv) > 1:
|
if len(sys.argv) > 1:
|
||||||
if sys.argv[-1] == "d":
|
if sys.argv[-1] == "d":
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
Reference in New Issue
Block a user