ilml-plugin-linkedin 1.2.2 → 1.3.1
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/CHANGELOG.md +16 -0
- package/README.md +118 -52
- package/dist/funnelRunner.mjs +20 -18
- package/dist/messageBot.mjs +101 -101
- package/dist/run.mjs +38 -38
- package/dist/scout.mjs +86 -86
- package/dist/src/saveLoginState.mjs +3 -3
- package/dist/syncAll.mjs +98 -98
- package/dist/viewers.mjs +85 -85
- package/dist/visit.mjs +85 -85
- package/dist/warmScan.mjs +5 -0
- package/ilml-plugin.json +2 -1
- package/package.json +11 -4
- package/target-companies.json +58 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
`);var
|
|
3
|
-
\u2713 Cookies saved to
|
|
1
|
+
import p from"puppeteer";import{config as f}from"dotenv";import n from"fs";import r from"path";var u="cookies.json";function d(){let o=process.env.ILML_SCOPE_DIR;return o?r.join(o,"plugins-state","linkedin","cookies.json"):u}function k(){let o=d(),e=r.dirname(o);return e&&e!=="."&&!n.existsSync(e)&&n.mkdirSync(e,{recursive:!0}),o}function a(o){let e=k();return n.writeFileSync(e,JSON.stringify(o)),e}f();console.log("Opening browser for LinkedIn login...");console.log(`Log in manually, then press Enter here to save cookies.
|
|
2
|
+
`);var l=await p.launch({headless:!1,defaultViewport:null}),i=await l.newPage();try{await i.goto("https://www.linkedin.com/login");let o=process.env.LINKEDIN_LOGIN,e=process.env.LINKEDIN_PASS;if(o&&e)try{await i.$('input[id="username"]')&&(await i.type('input[id="username"]',o,{delay:100}),await i.type('input[id="password"]',e,{delay:100}),console.log("Auto-filled credentials. Click Sign In or complete verification."))}catch{console.log("Auto-fill failed \u2014 log in manually.")}console.log("Waiting for you to log in..."),console.log("When you see your LinkedIn feed, press Enter here to save cookies."),await new Promise(s=>{process.stdin.once("data",()=>s())});let t=await i.cookies(),c=a(t);console.log(`
|
|
3
|
+
\u2713 Cookies saved to ${c} (${t.length} cookies)`)}catch(o){console.error("Login failed:",o.message)}finally{await l.close()}
|