From 8570c0651ecd96b6f4288c117fa339153d03431f Mon Sep 17 00:00:00 2001 From: Cullen Watson Date: Sun, 21 Jul 2024 13:05:18 -0500 Subject: [PATCH] fix:key error (#176) --- 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 scrape_jobs( 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)