FIX: Allow Indeed search term with complex syntax

pull/139/head
Lluís Salord Quetglas 2024-04-29 13:51:09 +02:00 committed by GitHub
parent 5d3df732e6
commit 70c2adef80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -90,10 +90,11 @@ class IndeedScraper(Scraper):
jobs = []
new_cursor = None
filters = self._build_filters()
search_term = self.scraper_input.search_term.replace('"', '\\"') if self.scraper_input.search_term else ""
query = self.job_search_query.format(
what=(
f'what: "{self.scraper_input.search_term}"'
if self.scraper_input.search_term
f'what: "{search_term}"'
if search_term
else ""
),
location=(