From 03306a613e02887498cebd837b7c1884f86470ff Mon Sep 17 00:00:00 2001 From: Cullen Date: Wed, 10 Jan 2024 14:00:16 -0600 Subject: [PATCH 1/2] fix: linkedin no results --- src/jobspy/scrapers/linkedin/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/jobspy/scrapers/linkedin/__init__.py b/src/jobspy/scrapers/linkedin/__init__.py index 6d643dc..03c0cfb 100644 --- a/src/jobspy/scrapers/linkedin/__init__.py +++ b/src/jobspy/scrapers/linkedin/__init__.py @@ -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: From 1938964e92778181cd0c7124884da66f6469cbaf Mon Sep 17 00:00:00 2001 From: Cullen Date: Wed, 10 Jan 2024 14:00:57 -0600 Subject: [PATCH 2/2] fix: linkedin no results --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3b57c32..d3da633 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "python-jobspy" -version = "1.1.32" +version = "1.1.33" description = "Job scraper for LinkedIn, Indeed, Glassdoor & ZipRecruiter" authors = ["Zachary Hampton ", "Cullen Watson "] homepage = "https://github.com/Bunsly/JobSpy"