2023-07-06 17:12:01 -07:00
|
|
|
from pydantic import BaseModel
|
|
|
|
from enum import Enum
|
2023-07-07 19:00:59 -07:00
|
|
|
from ..jobs import JobResponse
|
2023-07-06 17:12:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
class Site(Enum):
|
|
|
|
LINKEDIN = "linkedin"
|
|
|
|
INDEED = "indeed"
|
|
|
|
ZIP_RECRUITER = "zip_recruiter"
|
|
|
|
|
|
|
|
|
|
|
|
class ScraperInput(BaseModel):
|
|
|
|
location: str
|
|
|
|
search_term: str
|
|
|
|
|
2023-07-07 19:00:59 -07:00
|
|
|
page: int = 1
|
2023-07-06 17:12:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
class Scraper: #: to be used as a child class
|
|
|
|
def __init__(self, site: Site):
|
|
|
|
self.site = site
|
|
|
|
|
2023-07-07 19:00:59 -07:00
|
|
|
def scrape(self, scraper_input: ScraperInput) -> JobResponse:
|
|
|
|
...
|