Fix Google job search

The previous regex did not capture all expected matches in the returned content
pull/223/head
Jason Geffner 2024-12-03 20:12:30 -08:00 committed by GitHub
parent d52e366ef7
commit c7603b513e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -232,7 +232,7 @@ class GoogleJobsScraper(Scraper):
def _find_job_info_initial_page(html_text: str): def _find_job_info_initial_page(html_text: str):
pattern = ( pattern = (
f'520084652":(' f'520084652":('
+ r"\[(?:[^\[\]]|\[(?:[^\[\]]|\[(?:[^\[\]]|\[[^\[\]]*\])*\])*\])*\])" + r"\[.*?\]\s*])\s*}\s*]\s*]\s*]\s*]\s*]"
) )
results = [] results = []
matches = re.finditer(pattern, html_text) matches = re.finditer(pattern, html_text)