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

NoneType error in get_profile_experiences() #462

Open
amodsachintha opened this issue Nov 16, 2024 · 0 comments
Open

NoneType error in get_profile_experiences() #462

amodsachintha opened this issue Nov 16, 2024 · 0 comments

Comments

@amodsachintha
Copy link

amodsachintha commented Nov 16, 2024

When trying to scrape certain profiles, the following Exception is thrown in get_profile_experiences.

Traceback (most recent call last):
  File "index.py", line 72, in get_profile
    experience = api.get_profile_experiences(profile.get('urn_id'))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "venv/lib/python3.11/site-packages/linkedin_api/linkedin.py", line 1007, in get_profile_experiences
    parsed_data = parse_item(item)
                  ^^^^^^^^^^^^^^^^
  File "venv/lib/python3.11/site-packages/linkedin_api/linkedin.py", line 909, in parse_item
    duration_text = component["caption"]["text"]
                    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^
TypeError: 'NoneType' object is not subscriptable

Failed when scraping https://www.linkedin.com/in/celikacaldwell

Python 3.11.9
linkedin-api 2.3.1

@amodsachintha amodsachintha changed the title NoneType error in get_profile_experiences() NoneType error in get_profile_experiences() Nov 16, 2024
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

1 participant