Skip to content

Commit

Permalink
fix: linkedin no results
Browse files Browse the repository at this point in the history
  • Loading branch information
cullenwatson committed Jan 10, 2024
1 parent 53bc33a commit 03306a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/jobspy/scrapers/linkedin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,11 @@ def job_type_code(job_type_enum):
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:
Expand Down

0 comments on commit 03306a6

Please sign in to comment.