Chrome Dev Summit's BigWebQuiz automation script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const puppeteer = require("puppeteer"); | |
async function launch() { | |
const browser = await puppeteer.launch({ | |
args: ["–proxy-server=<<secret>>"] | |
}); | |
const page = await browser.newPage(); | |
await page.authenticate({ | |
username: "<<secret>>", | |
password: "<<secret>>" | |
}); | |
await page.goto("http://bigwebquiz.com"); | |
await page.click('.vote-button[data-i="1"]'); | |
await browser.close(); | |
} | |
(async function main() { | |
for (let i = 0; i < 200; i++) await Promise.all([ | |
launch(), launch(), launch() | |
]); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment