@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ubaidbinwaris/linkedin",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -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"