add ps2.nice.kiwi as source
This commit is contained in:
parent
b9e2a1879e
commit
2a843d2274
12 changed files with 612 additions and 7 deletions
22
hack/kiwitest/raw.js
Normal file
22
hack/kiwitest/raw.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
const WebSocket = require("ws");
|
||||
|
||||
const wsc = new WebSocket(
|
||||
"wss://planetside-2-api.herokuapp.com/socket.io/?EIO=3&transport=websocket",
|
||||
{
|
||||
origin: "https://ps2.nice.kiwi",
|
||||
}
|
||||
);
|
||||
|
||||
wsc.on("open", () => {
|
||||
wsc.send(`42["worlds-update-request"]`);
|
||||
});
|
||||
|
||||
wsc.on("message", (e) => {
|
||||
const messageRaw = e.toString();
|
||||
|
||||
if (messageRaw.startsWith("42")) {
|
||||
const [event, message] = JSON.parse(messageRaw.slice(2));
|
||||
console.log({ message });
|
||||
wsc.close();
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue