fix: linkedin no results

pull/80/head
Cullen 2024-01-10 14:00:16 -06:00
parent 53bc33a43a
commit 03306a613e
1 changed files with 4 additions and 1 deletions

View File

@ -92,8 +92,11 @@ class LinkedInScraper(Scraper):
raise LinkedInException(str(e))
soup = BeautifulSoup(response.text, "html.parser")
job_cards = soup.find_all("div", class_="base-search-card")
if len(job_cards) == 0:
return JobResponse(jobs=job_list)
for job_card in soup.find_all("div", class_="base-search-card"):
for job_card in job_cards:
job_url = None
href_tag = job_card.find("a", class_="base-card__full-link")
if href_tag and "href" in href_tag.attrs: