linkedin2username icon indicating copy to clipboard operation
linkedin2username copied to clipboard

TypeError: 'NoneType' object is not subscriptable

Open b1tsec opened this issue 7 months ago • 2 comments

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

b1tsec avatar Jun 12 '25 08:06 b1tsec

I have fixed this bug already by myself, if you'd like me to share the working source code please do let me know.

b1tsec avatar Jun 12 '25 09:06 b1tsec

Thanks @b1tsec - would you be willing to submit your fix as a PR so I can review and merge? Thanks!

initstring avatar Jun 22 '25 03:06 initstring