OppaAI commited on
Commit
680d081
·
verified ·
1 Parent(s): 8d56a47

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -50,9 +50,9 @@ def search_jobs_tool(query: str, location: str, limit: int = 10, salary: str = N
50
  cards = soup.find_all("article", class_="resultJobItem")
51
 
52
  for card in cards[:limit]:
53
- title_elem = card.find("a", class_="resultJobItem-title")
54
- company_elem = card.find("span", class_="resultJobItem-employer")
55
- location_elem = card.find("li", class_="resultJobItem-location")
56
  link = title_elem.get("href") if title_elem else None
57
  if link and not link.startswith("http"):
58
  link = "https://www.jobbank.gc.ca" + link
 
50
  cards = soup.find_all("article", class_="resultJobItem")
51
 
52
  for card in cards[:limit]:
53
+ title_elem = card.find("a", attrs={"data-testid": "result-job-title"})
54
+ company_elem = card.find("div", attrs={"data-testid": "result-employer"})
55
+ location_elem = card.find("div", attrs={"data-testid": "result-location"})
56
  link = title_elem.get("href") if title_elem else None
57
  if link and not link.startswith("http"):
58
  link = "https://www.jobbank.gc.ca" + link