Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linkedin Session #396

Open
deividcingolani opened this issue May 12, 2022 · 4 comments
Open

Linkedin Session #396

deividcingolani opened this issue May 12, 2022 · 4 comments

Comments

@deividcingolani
Copy link

deividcingolani commented May 12, 2022

Hi!

@hugomn
Copy link

hugomn commented May 21, 2022

I've also checked the code but couldn't figure out how to fetch the previous work experience from a profile. Is it possible?

@deividcingolani
Copy link
Author

any update?

@mjyocca
Copy link

mjyocca commented Jul 12, 2022

  const client = new Client();
  await client.login.userPass({ username, password });

  const profile = await client.profile.getOwnProfile();

  const result: any = await client.request.get(
    `https://www.linkedin.com/voyager/api/identity/profiles/${profile?.entityUrn.split(':')[3]}/profileView`
  );
  const aggregateResults = result?.included?.reduce(
    (acc: Record<string, any[]>, item: any) => {
      if (item.$type == 'com.linkedin.voyager.identity.profile.Position') {
        acc.positions.push(item);
      } else if (item.$type == 'com.linkedin.voyager.identity.profile.Certification') {
        acc.certifications.push(item);
      } else if (item.$type == 'com.linkedin.voyager.entities.shared.MiniSchool') {
        acc.education.push(item);
      }
      return acc;
    },
    { certifications: [], positions: [], education: [] }
  );

Not perfect but could give that a go

@eilonmore
Copy link
Owner

@mjyocca
Feel free to open a pull request with this change :)
Can be placed here

@deividcingolani deividcingolani changed the title Get the Full Profile Linkedin Jul 26, 2022
@deividcingolani deividcingolani changed the title Linkedin Linkedin Session Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants