steam通过api获取开发者用户名id来进行观察商店直播间页面实现发弹幕功能 获取个人信息页面 刷在线人数加人气值上热门首页
steam通过api获取开发者用户名id来进行观察商店直播间页面实现发弹幕功能 获取个人信息页面 刷在线人数加人气值上热门首页可以参考我以前的帖子
https://bbs.itzmx.com/thread-93852-1-1.html
也就是说两种方式访问
win+r运行
steam://broadcast/watch/76561198122387352
浏览器
https://steamcommunity.com/broadcast/watch/76561198122387352
例如商店
https://store.steampowered.com/app/1035760
通过f12搜索getbroadcast
可获得关键api
https://steamcommunity.com/broadcast/getbroadcastmpd/?steamid=76561198235753944&broadcastid=0&viewertoken=0&watchlocation=6&sessionid=06682a65ccc9f86284678b2e
响应
{success: "ready", retry: 0, broadcastid: "5538382875461850459", eresult: 1,…}
broadcastid: "5538382875461850459"
cdn_auth_url_parameters: null
eresult: 1
heartbeat_interval: 30
hls_url: "https://steambroadcast.akamaized.net/broadcast/76561198235753944/7516846821693220674/hls_manifest/0/steambroadcast.akamaized.net/master.m3u8?broadcast_origin=repo-01-ord1.broadcast.steamcontent.com:80"
is_replay: 0
is_rtmp: 1
is_webrtc: null
num_viewers: 8
retry: 0
success: "ready"
title: ""
url: "https://steambroadcast.akamaized.net/broadcast/76561198235753944/7516846821693220674/manifest/0/steambroadcast.akamaized.net/?broadcast_origin=repo-01-ord1.broadcast.steamcontent.com:80"
viewertoken: "5458208283125166650"
webrtc_offer_sdp: null
webrtc_session_id: null
webrtc_turn_server: null
关键api2
https://steamcommunity.com/broadcast/getbroadcastinfo/?steamid=76561198235753944&broadcastid=5538382875461850459&location=6
响应
{success: 1, appid: "1035760", app_title: "微光之镜", title: "", viewer_count: 8, permission: 3,…}
app_title: "微光之镜"
appid: "1035760"
is_online: true
is_publisher: 1
is_replay: 0
is_rtmp: 1
permission: 3
seconds_delay: 10
success: 1
thumbnail_url: "https://steambroadcast.akamaized.net/broadcast/76561198235753944/5538382875461850459/thumbnail/?broadcast_origin=repo-01-ord1.broadcast.steamcontent.com:26443"
title: ""
update_interval: 60
viewer_count: 8
就可以很轻松得出,微光之镜的开发者id为76561198235753944
那么他的直播间就是https://steamcommunity.com/broadcast/watch/76561198235753944个人信息页面就是https://steamcommunity.com/id/titidatiti
请求添加好友post https://steamcommunity.com/actions/AddFriendAjax
内容
sessionID: vj70uxjm81idltrxa6eg6154
steamid: 76561198235753944
accept_invite: 0
响应{"invited":["76561198235753944"],"success":1} 代表成功
刷直播间房间号在线人数api,反复刷新即可,可以用ab来刷,一台vps可以维持6000人数在线左右
https://steamcommunity.com/broadcast/getbroadcastmpd/?steamid=76561198235753944
例子
yum -y install httpd-tools
ab -n 100000 -c 100 "https://steamcommunity.com/broadcast/getbroadcastmpd/?steamid=76561198235753944"
效果图
刷3W在线人数直接上首页排行榜榜一
https://web.archive.org/web/20220613180350/https://steamcommunity.com/broadcast/watch/76561198235753944
https://web.archive.org/web/20220613180418/https://steamcommunity.com/?subsection=broadcasts
页:
[1]