mirror of https://github.com/Bunsly/JobSpy
alignment
parent
e863199838
commit
5098ac22c2
|
@ -79,9 +79,9 @@ class GoozaliMapper:
|
|||
# Return a new GoozaliResponse with msg and the converted data
|
||||
return GoozaliResponse(msg=data['msg'], data=data_obj)
|
||||
|
||||
def get_value_by_job_post_Id(self, job_post_column: str, row: GoozaliRow, dict_column_name_to_columnZ):
|
||||
def get_value_by_job_post_Id(self, job_post_column: str, row: GoozaliRow, dict_column_name_to_column: dict[str, GoozaliColumn]):
|
||||
goozali_column_name = job_post_column_to_goozali_column[job_post_column]
|
||||
column = dict_column_name_to_columnZ[goozali_column_name]
|
||||
column = dict_column_name_to_column[goozali_column_name]
|
||||
value = row.cellValuesByColumnId[column.id]
|
||||
if (job_post_column == "location"):
|
||||
# todo: fix it
|
||||
|
@ -92,7 +92,7 @@ class GoozaliMapper:
|
|||
|
||||
return str(value)
|
||||
|
||||
def map_goozali_response_to_job_post(self, row: GoozaliRow, dict_column_name_to_column) -> JobPost:
|
||||
def map_goozali_response_to_job_post(self, row: GoozaliRow, dict_column_name_to_column: dict[str, GoozaliColumn]) -> JobPost:
|
||||
temp = {}
|
||||
for col in job_post_column_names:
|
||||
value = self.get_value_by_job_post_Id(
|
||||
|
|
|
@ -23,8 +23,7 @@ job_post_column_names = ["id",
|
|||
"location",
|
||||
"company_industry"]
|
||||
|
||||
|
||||
# Key mapper: Extract 'name' as the key
|
||||
|
||||
|
||||
def extract_goozali_column_name(column): return column.name if isinstance(
|
||||
column, GoozaliColumn) else None
|
||||
|
|
|
@ -36,7 +36,7 @@ try:
|
|||
response_data.rows, column, column_choice)
|
||||
filtered_rows_by_age_and_column_choice = component.filter_rows_by_hours(
|
||||
filtered_rows_by_column_choice, hours_old)
|
||||
dict_column_name_to_column = create_dict_by_key_and_value(
|
||||
dict_column_name_to_column: dict[str, GoozaliColumn] = create_dict_by_key_and_value(
|
||||
response_data.columns, extract_goozali_column_name)
|
||||
response: list[JobPost] = []
|
||||
for row in filtered_rows_by_age_and_column_choice:
|
||||
|
|
Loading…
Reference in New Issue