Skip to content

Commit edcdef9

Browse files
committed
loginURL 검사 로직을 위해 loginURL 을 인자값으로 받을 수 있도록 변경
1 parent 7526968 commit edcdef9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/app/naver/pageInteractor.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default class PageInteractor {
88
this.page = page;
99
}
1010

11-
async login(id: string, password: string, delay?: number) {
11+
async login(id: string, password: string, delay?: number, loginURL?: string) {
1212
await Promise.all([
1313
this.page.waitForSelector("#id"),
1414
this.page.waitForSelector("#pw"),
@@ -24,7 +24,11 @@ export default class PageInteractor {
2424
this.page.waitForNavigation({ waitUntil: "networkidle2" }),
2525
]);
2626

27-
if (this.page.url().includes("https://nid.naver.com/nidlogin.login")) {
27+
if (
28+
this.page
29+
.url()
30+
.includes(loginURL || "https://nid.naver.com/nidlogin.login")
31+
) {
2832
throw new Error("Login failed");
2933
}
3034
}

0 commit comments

Comments
 (0)