Created
May 9, 2021 12:14
-
-
Save sksat/35fb472fda4800aa4cf5048bbe4713f3 to your computer and use it in GitHub Desktop.
marupop-auto
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'); | |
puppeteer.launch({ | |
headless: false, | |
executablePath: "/usr/bin/chromium", | |
ignoreDefaultArgs: "--mute-audio" | |
}).then(async browser => { | |
const page = await browser.newPage() | |
await page.goto('https://marupop.yopc.dev/') | |
while(true){ | |
await page.waitForSelector('.jss8 > .MuiGrid-root > .MuiGrid-root:nth-child(2) > .MuiButtonBase-root > .MuiButton-label') | |
await page.click('.jss8 > .MuiGrid-root > .MuiGrid-root:nth-child(2) > .MuiButtonBase-root > .MuiButton-label') | |
await page.waitForSelector('.jss8 > .MuiGrid-root > .MuiGrid-root:nth-child(1) > .MuiButtonBase-root > .MuiButton-label') | |
await page.click('.jss8 > .MuiGrid-root > .MuiGrid-root:nth-child(1) > .MuiButtonBase-root > .MuiButton-label') | |
await page.waitFor(3000); | |
} | |
await browser.close() | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment