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

View File

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

View File

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

View File

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

View File

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