Bdjobs Fixed (#280)

This commit is contained in:
itsShrizon
2025-07-28 21:05:10 +06:00
committed by GitHub
parent 53b3b41385
commit ae2b1ea42c
6 changed files with 432 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ from typing import Tuple
import pandas as pd
from jobspy.bayt import BaytScraper
from jobspy.bdjobs import BDJobs
from jobspy.glassdoor import Glassdoor
from jobspy.google import Google
from jobspy.indeed import Indeed
@@ -25,6 +26,8 @@ from jobspy.util import (
from jobspy.ziprecruiter import ZipRecruiter
# Update the SCRAPER_MAPPING dictionary in the scrape_jobs function
def scrape_jobs(
site_name: str | list[str] | Site | list[Site] | None = None,
search_term: str | None = None,
@@ -60,6 +63,7 @@ def scrape_jobs(
Site.GOOGLE: Google,
Site.BAYT: BaytScraper,
Site.NAUKRI: Naukri,
Site.BDJOBS: BDJobs, # Add BDJobs to the scraper mapping
}
set_logger_level(verbose)
job_type = get_enum_from_value(job_type) if job_type else None
@@ -213,4 +217,10 @@ def scrape_jobs(
by=["site", "date_posted"], ascending=[True, False]
).reset_index(drop=True)
else:
return pd.DataFrame()
return pd.DataFrame()
# Add BDJobs to __all__
__all__ = [
"BDJobs",
]