fix(models): country default USA

pull/17/head
Cullen Watson 2023-08-26 22:04:26 -05:00
parent ad04b203ac
commit 03a85bd3b4
5 changed files with 4 additions and 10 deletions

View File

@ -77,7 +77,7 @@ site_type (enum)
"company_name": "INTEL",
"job_url": "https://www.indeed.com/jobs/viewjob?jk=a2cfbb98d2002228",
"location": {
"country": "US",
"country": "USA",
"city": "Austin",
"state": "TX",
},
@ -101,7 +101,7 @@ site_type (enum)
"company_name": "Public Partnerships | PPL",
"job_url": "https://www.linkedin.com/jobs/view/3690013792",
"location": {
"country": "US",
"country": "USA",
"city": "Austin",
"state": "TX",
},

View File

@ -19,7 +19,7 @@ class JobType(Enum):
class Location(BaseModel):
country: str
country: str = "USA"
city: str = None
state: str = None
@ -36,7 +36,7 @@ class Compensation(BaseModel):
interval: CompensationInterval
min_amount: float
max_amount: float
currency: str = "US"
currency: str = "USA"
class JobPost(BaseModel):

View File

@ -125,7 +125,6 @@ class IndeedScraper(Scraper):
city=job.get("jobLocationCity"),
state=job.get("jobLocationState"),
postal_code=job.get("jobLocationPostal"),
country="US",
),
job_type=job_type,
compensation=compensation,

View File

@ -167,9 +167,6 @@ class LinkedInScraper(Scraper):
:param metadata_card
:return: location
"""
location = Location(
country="US",
)
if metadata_card is not None:
location_tag = metadata_card.find(
"span", class_="job-search-card__location"
@ -179,7 +176,6 @@ class LinkedInScraper(Scraper):
if len(parts) == 2:
city, state = parts
location = Location(
country="US",
city=city,
state=state,
)

View File

@ -292,7 +292,6 @@ class ZipRecruiterScraper(Scraper):
else:
city, state = None, None
return Location(
country="US",
city=city,
state=state,
)