Skip to content

Latest commit

 

History

History
108 lines (79 loc) · 3.03 KB

README.md

File metadata and controls

108 lines (79 loc) · 3.03 KB

logo

Linkout Linkedin Scraper

License: MIT License

Here you can find secure scraping using Puppeteer for different LinkedIn actions

  • Login
  • Connection Request
  • Follow message
  • Visit Profile
  • Like posts
  • Endorse Profile

Install

npm install linkout-scraper puppeteer-extra --save

Setup

  • Get LI_AT - this token will be used to authenticate to user's LinkedIn profile.

Usage

const Linkout = require("linkout-scraper");
const puppeteer = require("puppeteer-extra");
const dotenv = require("dotenv");

dotenv.config();

// add stealth plugin and use defaults (all evasion techniques)
const StealthPlugin = require("puppeteer-extra-plugin-stealth");
puppeteer.use(StealthPlugin());

(async () => {
  const browser = await puppeteer.launch({
    headless: false,
  });
  const page = await browser.newPage();
  const cdp = await page.target().createCDPSession();

  await page.setViewport({
    width: 1440,
    height: 900,
  });

  // add ghost-cursor for maximum safety
  await Linkout.tools.loadCursor(page, false);

  // remove webdriver detection
  await page.evaluateOnNewDocument(() => {
    delete navigator.__proto__.webdriver;
  });

  await Linkout.tools.setUserAgent(page, 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36');

  // Login with LinkedIn
  await Linkout.services.login(page, cdp, {
    cookie: LI_AT,
  });

  // Connect on LinkedIn
  await Linkout.services.connect(page, cdp, {
    message: "Hi {{firstName}}, let's connect!",
    url: "https://www.linkedin.com/in/sai-adarsh/",
  });

  // Send a message on LinkedIn
  await Linkout.services.message(page, cdp, {
    message: "Hello, {{firstName}}!",
    url: "https://www.linkedin.com/in/sai-adarsh/",
  });

  // Visit a LinkedIn profile
  await Linkout.services.visit(page, cdp, {
    url: "https://www.linkedin.com/in/sai-adarsh/",
  });
})();

Who made this project

This project was made by Linkout - LinkedIn Outreach on Autopilot, and being maintained by Sai Adarsh. Any contribution is welcomed!

🤝 Contributing

Please check our Contribution guide to get started!

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

  • Fork the repository, Clone it on your device. That's it 🎉
  • Finally make a pull request :)

📝 License

This project is MIT License licensed.