const WebSocket = require('ws');
const ws = new WebSocket("wss://gorilla.win/ws/ru?thresholdTimeout=100&threshold=2");
ws.on('message', msg => {
console.log(msg);
});
let object = [{"headers":{"accept-language":"ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7","cache-control":"no-cache","pragma":"no-cache","sec-websocket-extensions":"permessage-deflate; client_max_window_bits","sec-websocket-key":"VHVmjfC2BPx59mNHiCI3tQ==","sec-websocket-version":"13"}}]
ws.on('open', () => {
ws.send(JSON.stringify(object))
})
ws.on('error', data => {
console.log(data);
})
const WebSocket = require('ws');
const ws = new WebSocket("wss://gorilla.win/ws/ru?thresholdTimeout=100&threshold=2");
ws.on('message', msg => {
console.log(msg);
});
ws.on('error', data => {
console.log(data);
})
(async () => {
let response = await fetch("https://csgopositive.com/lib/load_events.php?action=load&lang=RU", {"credentials":"include","headers":{"accept":"*/*","accept-language":"ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7","x-requested-with":"XMLHttpRequest"},"referrer":"https://csgopositive.com/","referrerPolicy":"no-referrer-when-downgrade","body":null,"method":"GET","mode":"cors"});
console.log(response)
})()
fetch("https://csgopositive.com/lib/load_events.php?action=load&lang=RU", {"credentials":"include","headers":{"accept":"*/*","accept-language":"ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7","x-requested-with":"XMLHttpRequest"},"referrer":"https://csgopositive.com/","referrerPolicy":"no-referrer-when-downgrade","body":null,"method":"GET","mode":"cors"})
Object.defineProperty(Array.prototype, 'flat', {
value: function(depth = 1) {
return this.reduce(function (flat, toFlatten) {
return flat.concat((Array.isArray(toFlatten) && (depth>1)) ?
toFlatten.flat(depth-1)
:
toFlatten);
}, []);
}
});
let response = await fetch("https://lds-api.ligastavok.ru/rest/events/v1/groupingByProposedType", {"credentials":"omit","headers":{"accept":"application/json","content-type":"application/json","x-api-cred":"|","x-application-name":"desktop","x-req-id":"79f73213-5592-4f14-a49e-f8538ae20d97"},"referrer":"https://www.ligastavok.ru/bets/my-line/counter-strike","referrerPolicy":"no-referrer-when-downgrade","body":"{\"limit\":10,\"sportIds\":[12906],\"categoryIds\":[],\"tournamentIds\":[]}","method":"POST","mode":"cors"});
let data = await response.json()
console.log(data.result[0].events[0].outcomesWinner.main.outcomes._1.value)
await data.result.map(v => v.events.map(v => v.outcomesWinner.main || v.outcomesWinner.ot) )
await data.result.map(v => v.events.map(v => v.outcomesWinner.main.outcomes || v.outcomesWinner.ot.outcomes) )
И еще у меня какая то фигня почему то если подключать напрямую кабель
Или компьютер его не видит или не знаю в чем проблема когда создаю новое подключение все правильно ввожу выдает ошибку: "модем или другое устройство сообщило об ошибке"