linkedin-profile-scraper-api icon indicating copy to clipboard operation
linkedin-profile-scraper-api copied to clipboard

Empty user profile data in some instances

Open karanrajpal14 opened this issue 4 years ago • 4 comments

Hello,

I've been trying to setup this script but I've noticed that in some instances, the script is returning empty user profile data for no apparent reason.

Here are a few profiles that return as empty despite having actual content:

https://www.linkedin.com/in/matthew-lazarowitz/
https://www.linkedin.com/in/vamsee-krishna-081a3a17/
https://www.linkedin.com/in/lohith-rangappa-16325644/

All these profiles essentially return:

Got user profile data: {"fullName":null,"title":null,"location":null,"photo":null,"description":null,"url":"https://www.linkedin.com/feed/"}

Is this a known issue? Is there any way I can resolve this?

karanrajpal14 avatar Jul 13 '20 23:07 karanrajpal14

Hello, even I was facing the same issue .Try increasing the waiting time at line 270 that worked for me.

pooja-anandani avatar Oct 06 '20 17:10 pooja-anandani

I also encountered the same issue. Increasing the waiting time at line 270 of index.ts did not work for me. Anyone has a good solution?

For example, this link returns an empty result: https://www.linkedin.com/in/scott-jennings-mmj/

fan-wen avatar Dec 31 '20 00:12 fan-wen

Hey there! I have realised that whenever library is blocking some 'xhr' scripts, then it returns empty user profile data! Can anyone help me how to stop it from blocking! image

Here we can see it is blocking 3 xhr scripts!

Tewatia5355 avatar Sep 11 '21 02:09 Tewatia5355

Hey there! I have realised that whenever library is blocking some 'xhr' scripts, then it returns empty user profile data! Can anyone help me how to stop it from blocking! image

Here we can see it is blocking 3 xhr scripts!

app.use(function (req, res, next) {

// Website you wish to allow to connect
res.setHeader('Access-Control-Allow-Origin', 'http://localhost:8888');

// Request methods you wish to allow
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE');

// Request headers you wish to allow
res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With,content-type');

// Set to true if you need the website to include cookies in the requests sent
// to the API (e.g. in case you use sessions)
res.setHeader('Access-Control-Allow-Credentials', true);

// Pass to next layer of middleware
next();});

Add this middleware code before to ensure XHR scripts run.

DrakenWan avatar Nov 13 '21 08:11 DrakenWan