proxy screenshotter too

todo maybe just host this whole thing at home
This commit is contained in:
Lamp 2020-04-07 19:27:17 -07:00 committed by GitHub
parent 00bea9d9ab
commit 28929d47bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -8,7 +8,10 @@ global.screenshotter = {
await page.setViewport({ width: 1440, height: 900 }); await page.setViewport({ width: 1440, height: 900 });
try { try {
await page.goto('http://www.multiplayerpiano.com/lobby'); await page.goto('http://www.multiplayerpiano.com/lobby');
await page.evaluate(function () { document.getElementById('modal').click() }); await page.evaluate(function () {
document.getElementById('modal').click();
MPP.client.uri = "ws://530s.gq:28886";
});
await new Promise(resolve => setTimeout(resolve, 5000)); await new Promise(resolve => setTimeout(resolve, 5000));
let screenshot = await page.screenshot({ type: 'png' }); let screenshot = await page.screenshot({ type: 'png' });
let filename = `Screenshot of www.multiplayerpiano.com/lobby @ ${new Date().toISOString()}.png`; let filename = `Screenshot of www.multiplayerpiano.com/lobby @ ${new Date().toISOString()}.png`;