Skip to content

Commit

Permalink
fix:keyerror
Browse files Browse the repository at this point in the history
  • Loading branch information
cullenwatson committed Aug 2, 2024
1 parent a5c18d4 commit bd2bb9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "staffspy"
version = "0.2.6"
version = "0.2.7"
description = "Staff scraper library for LinkedIn"
authors = ["Cullen Watson <[email protected]>"]
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion staffspy/linkedin/employee.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def parse_emp(self, emp: Staff, emp_dict: dict):

emp.followers = emp_dict.get("followingState", {}).get("followerCount")
emp.connections = emp_dict["connections"]["paging"]["total"]
emp.location = emp_dict["geoLocation"]["geo"]["defaultLocalizedName"]
emp.location = emp_dict.get("geoLocation",{}).get("geo",{}).get("defaultLocalizedName",{})

# Handle empty elements case for company
top_positions = emp_dict.get("profileTopPosition", {}).get("elements", [])
Expand Down

0 comments on commit bd2bb9d

Please sign in to comment.