Spaces:
Running
Running
Update app.py
Browse files
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",
|
| 54 |
-
company_elem = card.find("
|
| 55 |
-
location_elem = card.find("
|
| 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
|