mirror of https://github.com/Bunsly/JobSpy
fixed not sending the right response and remove it tag
parent
327b13f82d
commit
cbe3a97a73
|
@ -8,13 +8,14 @@ from jobspy.telegram_bot import TelegramBot
|
|||
|
||||
logger = create_logger("Main")
|
||||
filter_by_title: list[str] = ["test", "qa", "Lead", "Full-Stack", "Full Stack", "Fullstack", "Frontend", "Front-end", "Front End", "DevOps", "Physical", "Staff"
|
||||
"data", "automation", "BI", "Principal", "Architect", "Android", "IT", "Machine Learning", "Student"]
|
||||
"data", "automation", "BI", "Principal", "Architect", "Android", "Machine Learning", "Student"]
|
||||
|
||||
|
||||
def filter_jobs_by_title_name(job):
|
||||
def filter_jobs_by_title_name(job: JobPost):
|
||||
for filter_title in filter_by_title:
|
||||
if re.search(filter_title, job.title, re.IGNORECASE):
|
||||
logger.info(f"job filtered out by title: {job.id} , {job.title}")
|
||||
logger.info(f"job filtered out by title: {job.id} , {
|
||||
job.title} , found {filter_title}")
|
||||
return False
|
||||
|
||||
return True
|
||||
|
|
|
@ -89,11 +89,10 @@ class GoozaliScraper(Scraper):
|
|||
filtered_rows_by_column_choice, scraper_input.hours_old)
|
||||
dict_column_name_to_column: dict[str, GoozaliColumn] = create_dict_by_key_and_value(
|
||||
goozali_response.data.columns, extract_goozali_column_name)
|
||||
response: list[JobPost] = []
|
||||
# map to JobResponse Object
|
||||
for row in filtered_rows_by_age_and_column_choice:
|
||||
job_post = self.mapper.map_goozali_response_to_job_post(
|
||||
row, dict_column_name_to_column)
|
||||
response.append(job_post)
|
||||
job_list.append(job_post)
|
||||
|
||||
return JobResponse(jobs=job_list)
|
||||
|
|
Loading…
Reference in New Issue