Skip to content

Commit

Permalink
FIX: Allow Indeed search term with complex syntax (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
lluissalord committed Apr 30, 2024
1 parent bf73c06 commit dcd7144
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/jobspy/scrapers/indeed/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,11 @@ def _scrape_page(self, cursor: str | None) -> Tuple[list[JobPost], str | None]:
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=(
Expand Down

0 comments on commit dcd7144

Please sign in to comment.