mirror of https://github.com/Bunsly/JobSpy
was erroring when job post had countryname not in mapping
parent
0bcfd6a6f6
commit
3dc8c0c066
|
@ -280,10 +280,15 @@ class LinkedInScraper(Scraper):
|
|||
)
|
||||
elif len(parts) == 3:
|
||||
city, state, country = parts
|
||||
try:
|
||||
country_enum = Country.from_string(country)
|
||||
except ValueError:
|
||||
country_enum = Country.from_string(self.country)
|
||||
location = Location(
|
||||
city=city,
|
||||
state=state,
|
||||
country=Country.from_string(country),
|
||||
country=country_enum,
|
||||
)
|
||||
|
||||
return location
|
||||
|
||||
|
|
Loading…
Reference in New Issue