fix key error (#186)

This commit is contained in:
Cullen Watson
2024-08-14 02:54:40 -05:00
committed by GitHub
parent 6bb7d81ba8
commit 6f1490458c
2 changed files with 2 additions and 2 deletions

View File

@@ -200,7 +200,7 @@ class ZipRecruiterScraper(Scraper):
script_tag = soup.find("script", type="application/json")
if script_tag:
job_json = json.loads(script_tag.string)
job_url_val = job_json["model"]["saveJobURL"]
job_url_val = job_json["model"].get("saveJobURL", "")
m = re.search(r"job_url=(.+)", job_url_val)
if m:
job_url_direct = m.group(1)