npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

linkedin-client

v0.1.1

Published

Linkedin HTTP client to retrieve data about individuals or companies

Downloads

156

Readme

Linkedin Client

npm version

This package allows to fetch data about individuals or companies on Linkedin.

app screenshot

Demo

You can try out the tool on my personal server here. Remember this is only a showcase interface.

Installation

npm i linkedin-client

Usage

You need your Linkedin cookie called "li_at". This way, requests will be sent on your behalf.

const LinkedinClient = require('linkedin-client');

(async () => {
  const client = new LinkedinClient('YOUR_LINKEDIN_COOKIE');
  const data = await client.fetch('https://www.linkedin.com/in/williamhgates/');
  console.log(data);
})();

CLI usage

If you want to retrieve people details :

node src/cli.js https://www.linkedin.com/in/williamhgates/

Or if you want to retrieve company information :

node src/cli.js https://www.linkedin.com/company/microsoft/

Tests

npm test

Web interface

If you want to run the web interface on you own, you can do as follows :

git clone https://github.com/Cooya/Linkedin-Client.git linkedin-client
cd linkedin-client
npm install
npm run build
echo "module.exports = { cookie: 'YOUR_LINKEDIN_COOKIE' };" > config.js
npm start

Context

  • Folder src/v1 : At the very beginning, the project was a freelance mission for a client needing some leads. I used Linkedin API v1.
  • Folder src/v2 : After that I decided to design a web interface to showcase the tool. I was limited by the Linkedin API, so I somehow completed it by retrieving data with Puppeteer, a driver for an headless Google Chrome browser.
  • The Linkedin API v1 is now deprecated and the v2 is not really usable so, in this third version, there is no more use of the API and I completely skipped the use of web browser, it is a simple HTTP request and Cheerio does the job.