updated the flow like the test, Next: map to JobPost or use own classes

pull/231/head
Yariv Menachem 2024-12-17 19:55:34 +02:00
parent c47c1a7e77
commit 58f0793181
1 changed files with 8 additions and 7 deletions

View File

@ -81,14 +81,15 @@ class GoozaliScraper(Scraper):
goozali_response = self.mapper.map_response_to_goozali_response( goozali_response = self.mapper.map_response_to_goozali_response(
response=response) response=response)
# suggestL create groupby field and then filter by hours # suggestL create groupby field and then filter by hours
# filter result by Field like the web # filter result by Field
field_cloumn = self.component.find_column( column = self.component.find_column(
goozali_response.data.columns, "Field") goozali_response.data.columns, "Field")
software_engineering_choice = self.component.find_choice_from_column( column_choice = self.component.find_choice_from_column(
field_cloumn, "Software Engineering") column, "Software Engineering")
# filter by date filtered_rows_by_column_choice = self.component.filter_rows_by_column_choice(
filtered_rows_by_age = self.component.filter_rows_by_hours( goozali_response.data.rows, column, column_choice)
goozali_response.data.rows, scraper_input.hours_old) filtered_rows_by_age_and_column_choice = self.component.filter_rows_by_hours(
filtered_rows_by_column_choice, scraper_input.hours_old)
# map to JobResponse Object # map to JobResponse Object
return JobResponse(jobs=job_list) return JobResponse(jobs=job_list)