FIX: Allow Indeed search term with complex syntax (#139)

pull/146/head
Lluís Salord Quetglas 2024-04-30 19:05:43 +02:00 committed by GitHub
parent bf73c061bd
commit dcd7144318
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 = [] jobs = []
new_cursor = None new_cursor = None
filters = self._build_filters() 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( query = self.job_search_query.format(
what=( what=(
f'what: "{self.scraper_input.search_term}"' f'what: "{search_term}"'
if self.scraper_input.search_term if search_term
else "" else ""
), ),
location=( location=(