mirror of https://github.com/Bunsly/JobSpy
chore: clean up
parent
5701826399
commit
f31246ee64
|
@ -4,7 +4,6 @@ from .v1 import router as v1_router
|
|||
|
||||
router = APIRouter(
|
||||
prefix="/api",
|
||||
tags=["api"],
|
||||
)
|
||||
router.include_router(v1_router)
|
||||
router.include_router(auth_router)
|
||||
|
|
|
@ -3,6 +3,6 @@ from fastapi import APIRouter
|
|||
from api.auth.token import router as token_router
|
||||
from api.auth.register import router as register_router
|
||||
|
||||
router = APIRouter(prefix="/auth")
|
||||
router = APIRouter(prefix="/auth", tags=["auth"])
|
||||
router.include_router(token_router)
|
||||
router.include_router(register_router)
|
||||
|
|
|
@ -2,7 +2,7 @@ from fastapi import APIRouter, HTTPException, status
|
|||
from api.core.users import UserCreate, UserInDB
|
||||
from api.auth.db_utils import get_user, get_password_hash, create_user
|
||||
|
||||
router = APIRouter(prefix="/register", tags=["register"])
|
||||
router = APIRouter(prefix="/register")
|
||||
|
||||
|
||||
@router.post("/", response_model=dict)
|
||||
|
|
|
@ -5,7 +5,7 @@ from api.core.users import Token
|
|||
from api.auth.db_utils import authenticate_user
|
||||
from api.auth.auth_utils import create_access_token
|
||||
|
||||
router = APIRouter(prefix="/token", tags=["token"])
|
||||
router = APIRouter(prefix="/token")
|
||||
|
||||
|
||||
@router.post("/", response_model=Token)
|
||||
|
|
|
@ -55,6 +55,8 @@ class LinkedInScraper(Scraper):
|
|||
"f_AL": "true" if scraper_input.easy_apply else None,
|
||||
}
|
||||
|
||||
params = {k: v for k, v in params.items() if v is not None}
|
||||
print(params)
|
||||
response = session.get(self.url, params=params, allow_redirects=True)
|
||||
|
||||
if response.status_code != status.HTTP_200_OK:
|
||||
|
|
|
@ -5,7 +5,7 @@ from api.core.scrapers.ziprecruiter import ZipRecruiterScraper
|
|||
from api.core.scrapers.linkedin import LinkedInScraper
|
||||
from api.core.scrapers import ScraperInput, Site, JobResponse
|
||||
|
||||
router = APIRouter(prefix="/jobs")
|
||||
router = APIRouter(prefix="/jobs", tags=["jobs"])
|
||||
|
||||
SCRAPER_MAPPING = {
|
||||
Site.LINKEDIN: LinkedInScraper,
|
||||
|
|
2
main.py
2
main.py
|
@ -5,7 +5,7 @@ from api import router as api_router
|
|||
|
||||
app = FastAPI(
|
||||
title="JobSpy Backend",
|
||||
description="Endpoints for job board scrapers",
|
||||
description="Endpoints for job boardLinkedIn, Indeed, and ZipRecruiterscrapers",
|
||||
version="1.0.0",
|
||||
)
|
||||
app.include_router(api_router)
|
||||
|
|
|
@ -6,4 +6,4 @@ SUPABASE_URL = os.environ.get("SUPABASE_URL")
|
|||
SUPABASE_KEY = os.environ.get("SUPABASE_KEY")
|
||||
JWT_SECRET_KEY = os.environ.get("JWT_SECRET_KEY")
|
||||
ALGORITHM = "HS256"
|
||||
ACCESS_TOKEN_EXPIRE_MINUTES = 3600
|
||||
ACCESS_TOKEN_EXPIRE_MINUTES = 60
|
||||
|
|
Loading…
Reference in New Issue