Last active
August 19, 2024 14:03
-
-
Save stepney141/8d3f194c15122f0134cb87b2b10708f8 to your computer and use it in GitHub Desktop.
bookmeter_wish samples
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 mode = parseArgv(process.argv); | |
const users = [ | |
{ id: "1504793", name: "Azaika" }, | |
{ id: "1504772", name: "qraphnet" }, | |
{ id: "1504804", name: "caphosra" }, | |
{ id: "1504818", name: "Juei" }, | |
{ id: "1504820", name: "LLUUIIGGEE" }, | |
{ id: "1503969", name: "ゆみや" }, | |
{ id: "1504789", name: "hakatashi" } | |
]; | |
for (const u of users) { | |
await main({ | |
mode, | |
userId: u.id, | |
doLogin: false, | |
outputFilePath: { | |
wish: `./csv/tsg/${u.name}.csv`, | |
stacked: `./csv/tsg/${u.name}_stacked.csv` | |
} | |
}); | |
await sleep(60 * 1000); | |
} |
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 mode = parseArgv(process.argv); | |
const browser = await puppeteer.launch({ | |
defaultViewport: { width: 1000, height: 1000 }, | |
headless: false, | |
slowMo: 15 | |
}); | |
const bkmt = await new Bookmaker(browser, BOOKMETER_DEFAULT_USER_ID).login(); | |
const targetBooks = await readUrlList("./toda-s141.txt"); | |
for (const url of targetBooks!) { | |
const bookInfo = await bkmt.scanEachBook(url, { register: true, mode }); | |
console.log(bookInfo); | |
await sleep(60 * 1000); | |
} | |
await browser.close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment