Skip to content

Using Cookies To Login

Wagner Leonardi edited this page Oct 16, 2019 · 1 revision

You can use cookies instead of providing email and password to login. Cookies use an already logged credential and will bypass login phase, it's very useful for scrapedin in a remote server.

1. Extract cookies from a session:

You have to be logged in your personal computer on LinkedIn, and then extract your cookies from your browser and save them in a file.

If you don't know how to do that, we suggest to install EditThisCookie chrome extension, after installing open a logged LinkedIn website and via the extension click on export and save the contents in a file.

2. Pass cookies to scrapedin:

const scrapedin = require('scrapedin')
const fs = require('fs')

const cookies = fs.readFileSync('./yourCookiesFile')
const options = {
  cookies: JSON.parse(cookies)
}

const profileScraper = await scrapedin(options)
const profile = profileScraper('https://www.linkedin.com/in/some-profile/')