From 4e7ac9a58328fbe0df6d8dfcaa0083ff78d894e9 Mon Sep 17 00:00:00 2001 From: Jason Geffner Date: Wed, 4 Dec 2024 14:45:59 -0800 Subject: [PATCH] Fix Google job search (#223) The previous regex did not capture all expected matches in the returned content --- src/jobspy/scrapers/google/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jobspy/scrapers/google/__init__.py b/src/jobspy/scrapers/google/__init__.py index e6a2c57..523e6f5 100644 --- a/src/jobspy/scrapers/google/__init__.py +++ b/src/jobspy/scrapers/google/__init__.py @@ -232,7 +232,7 @@ class GoogleJobsScraper(Scraper): def _find_job_info_initial_page(html_text: str): pattern = ( f'520084652":(' - + r"\[(?:[^\[\]]|\[(?:[^\[\]]|\[(?:[^\[\]]|\[[^\[\]]*\])*\])*\])*\])" + + r"\[.*?\]\s*])\s*}\s*]\s*]\s*]\s*]\s*]" ) results = [] matches = re.finditer(pattern, html_text)