Created
November 13, 2019 01:31
-
-
Save jsoverson/31fc33fe58ac4c7934ab318909852899 to your computer and use it in GitHub Desktop.
Chrome Dev Summit's BigWebQuiz automation script
This file contains hidden or 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