From ca85767a3c790175f6a86a2d50944275eaaba37b Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Mon, 20 Nov 2023 23:29:01 +0900 Subject: [PATCH] fixed auth error --- platforms/dmm-books.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platforms/dmm-books.ts b/platforms/dmm-books.ts index 24e27d7..724f8f7 100644 --- a/platforms/dmm-books.ts +++ b/platforms/dmm-books.ts @@ -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(