Code Monkey home page Code Monkey logo

Comments (4)

pooja-anandani avatar pooja-anandani commented on June 11, 2024

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

from linkedin-profile-scraper-api.

fan-wen avatar fan-wen commented on June 11, 2024

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/

from linkedin-profile-scraper-api.

Tewatia5355 avatar Tewatia5355 commented on June 11, 2024

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!

from linkedin-profile-scraper-api.

DrakenWan avatar DrakenWan commented on June 11, 2024

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.

from linkedin-profile-scraper-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.