Skip to content

TypeError: 'NoneType' object is not subscriptable #80

@b1tsec

Description

@b1tsec

Describe the bug
While specifying a depth of 3 or above the script breaks in some cases.

To Reproduce
linkedin2username -c 'this-is-a-company' -n company.com

Verify Expected Results
The tools works with a company that doesn't have more than 2 dashes "-" in their LinkedIn company URL.

Additional context
No special setup.

The full error message:
[*] Scraping results on loop 3... Traceback (most recent call last):g total: 100
File "/usr/bin/linkedin2username", line 745, in
main()
File "/usr/bin/linkedin2username", line 735, in main
employees = do_loops(session, company_id, outer_loops, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/bin/linkedin2username", line 624, in do_loops
found_employees = find_employees(result.text)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/bin/linkedin2username", line 561, in find_employees
occupation = entity['primarySubtitle']['text']
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
TypeError: 'NoneType' object is not subscriptable

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions