@ubaidbinwaris/linkedin 1.1.6 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/login/login.js +9 -0
package/package.json
CHANGED
package/src/login/login.js
CHANGED
|
@@ -72,6 +72,15 @@ async function loginToLinkedIn(options = {}, credentials = null) {
|
|
|
72
72
|
// If it returns true, it means we are now on the feed (resolved)
|
|
73
73
|
if (await handleMobileVerification(page)) {
|
|
74
74
|
// success, assume logged in
|
|
75
|
+
// Wait a moment for page to settle
|
|
76
|
+
await page.waitForTimeout(3000);
|
|
77
|
+
|
|
78
|
+
// Double check if we are really on feed
|
|
79
|
+
if (page.url().includes("/feed") || await isLoggedIn(page)) {
|
|
80
|
+
logger.info(`[${email}] Mobile Verification Successful ✅`);
|
|
81
|
+
await saveSession(context, email, true);
|
|
82
|
+
return { browser, context, page };
|
|
83
|
+
}
|
|
75
84
|
} else {
|
|
76
85
|
// Failed mobile verification.
|
|
77
86
|
// User Request: "otherwise after some delay using browser opens the browser and fill the form"
|