File size: 959 Bytes
9609abc
2284b0f
 
 
 
 
9609abc
2284b0f
 
9609abc
 
 
2284b0f
 
 
 
 
 
 
 
 
 
 
 
9609abc
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
let res = await fetch('https://gowah44030-playwright.hf.space/evaluate', {
    method: "POST",
    body: JSON.stringify({
        url: 'https://chat.lmsys.org/assets/index-c347e3dc.js',
        code: `
        (async function(){
            return await new Promise(async (resolve)=>{
                     
             try {
                //resolve(await fetch('https://chat.lmsys.org').then(res=>res.text()));
             } catch (e) { resolve(e);}
             //return;


                const ws = new WebSocket('wss://chat.lmsys.org/queue/join');
                ws.addEventListener('error', (e) => { resolve('error');});
                ws.addEventListener('open', function open() { resolve('open');});
                ws.addEventListener('close', () => { resolve('A') });

                //ws.on('message', function message(_data) { console.log(_data);});
            });
        })()
        `,
    })
}).then(res=>res.text());

console.log(res);