fixed auth error

This commit is contained in:
Nebel 2023-11-20 23:29:01 +09:00
parent 29b7e7fec5
commit ca85767a3c
Signed by: nebel
GPG key ID: 79807D08C6EF6460

View file

@ -237,6 +237,11 @@ export function DmmBooks({ db, browser }: { db: Database; browser: Browser }) {
const page = await ctx.newPage();
await page.goto("https://accounts.dmm.com/service/login/password");
await page.waitForURL("https://www.dmm.com/", { timeout: 0 });
await page.goto("https://www.dmm.com/service/-/exchange");
await Promise.race([
page.waitForURL("https://www.dmm.com/", { timeout: 0 }),
page.waitForURL("https://www.dmm.co.jp/top/", { timeout: 0 }),
]);
const secrets = await ctx.storageState();
await browser.close();
await db.run(