feat: add IndeedScraper

This commit is contained in:
Cullen Watson
2023-07-07 21:00:59 -05:00
parent 38f98fe595
commit 8c490babec
10 changed files with 199 additions and 26 deletions

View File

@@ -1,3 +1,16 @@
from fastapi import APIRouter
from api.core.scrapers.indeed import IndeedScraper
from api.core.scrapers import ScraperInput
from api.core.jobs import JobResponse
router = APIRouter(prefix="/jobs")
@router.get("/")
async def scrape_jobs(search_term: str, location: str, page: int = None):
scraper = IndeedScraper()
scraper_input = ScraperInput(search_term=search_term, location=location, page=page)
job_response = scraper.scrape(scraper_input)
return job_response