spb/social-runtime-crawler
Public
TypeScript 91.8%
HTML 3.2%
JavaScript 3%
SQL 1.4%
CSS 0.7%
1import { chromium } from "playwright";2const b = await chromium.launch(); const p = await b.newPage({ viewport: { width: 1500, height: 1000 } });3await p.goto("http://localhost:8351/access"); await p.fill('input[name=passcode]', "test1234"); await p.click("button"); await p.waitForURL("http://localhost:8351/");4await p.waitForTimeout(3500); await p.screenshot({ path: "/tmp/shot-home.png", fullPage: true });5const sid = (await (await fetch("http://127.0.0.1:8350/api/sessions?limit=1")).json())[0].session_id;6await p.goto(`http://localhost:8351/sessions/${sid}`); await p.waitForTimeout(3000); await p.screenshot({ path: "/tmp/shot-session.png", fullPage: true });7await p.click("text=world model"); await p.waitForTimeout(3500); await p.screenshot({ path: "/tmp/shot-world.png" });8await p.goto(`http://localhost:8351/platforms/youtube`); await p.waitForTimeout(2500); await p.screenshot({ path: "/tmp/shot-platform.png", fullPage: true });9await p.goto(`http://localhost:8351/jobs`); await p.waitForTimeout(2500); await p.screenshot({ path: "/tmp/shot-jobs.png" });10const errs = []; p.on("console", m => { if (m.type()==="error") errs.push(m.text()); });11await p.goto(`http://localhost:8351/entities`); await p.waitForTimeout(2500); await p.screenshot({ path: "/tmp/shot-entities.png" });12console.log("errors:", errs.slice(0,5)); await b.close();13