- refactor & #41 bug fix

This commit is contained in:
Zachary Hampton
2023-09-06 16:32:51 -07:00
parent 43eb2fe0e8
commit 690739e858
7 changed files with 21 additions and 13 deletions

View File

@@ -78,9 +78,7 @@ class IndeedScraper(Scraper):
raise StatusException(response.status_code)
soup = BeautifulSoup(response.content, "html.parser")
with open("text2.html", "w", encoding="utf-8") as f:
f.write(str(soup))
if "did not match any jobs" in str(soup):
if "did not match any jobs" in response.text:
raise ParsingException("Search did not match any jobs")
jobs = IndeedScraper.parse_jobs(