From 0173b748eecc1c7e1ff329b067b144375d710555 Mon Sep 17 00:00:00 2001 From: Cullen Watson Date: Sun, 21 Jul 2024 13:04:21 -0500 Subject: [PATCH] fix:key error --- pyproject.toml | 2 +- src/jobspy/__init__.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d750649..bfcb48e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "python-jobspy" -version = "1.1.60" +version = "1.1.61" description = "Job scraper for LinkedIn, Indeed, Glassdoor & ZipRecruiter" authors = ["Zachary Hampton ", "Cullen Watson "] homepage = "https://github.com/Bunsly/JobSpy" diff --git a/src/jobspy/__init__.py b/src/jobspy/__init__.py index e8c78ab..0e5deb1 100644 --- a/src/jobspy/__init__.py +++ b/src/jobspy/__init__.py @@ -189,7 +189,9 @@ def convert_to_annual(job_data: dict): job_data["salary_source"] = SalarySource.DESCRIPTION.value job_data["salary_source"] = ( - job_data["salary_source"] if job_data["min_amount"] else None + job_data["salary_source"] + if "min_amount" in job_data and job_data["min_amount"] + else None ) job_df = pd.DataFrame([job_data]) jobs_dfs.append(job_df)