josephlimtech / linkedin-profile-scraper-api

🕵️‍♂️ LinkedIn profile scraper returning structured profile data in JSON.
MIT License
567 stars 152 forks source link

Empty user profile data in some instances #17

Open karanrajpal14 opened 4 years ago

karanrajpal14 commented 4 years ago

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?

pooja-anandani commented 4 years ago

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

fan-wen commented 3 years ago

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/

Tewatia5355 commented 3 years ago

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!

DrakenWan commented 3 years ago

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.