fix(linkedin): fetch full description

This commit is contained in:
Cullen Watson
2023-08-26 07:07:29 -05:00
parent b4b836ff71
commit fe77c2a1f3
3 changed files with 34 additions and 3 deletions

View File

@@ -182,9 +182,9 @@ class ZipRecruiterScraper(Scraper):
)
return job_response
@classmethod
@staticmethod
def get_description(
cls, job_page_url: str, session: tls_client.Session
job_page_url: str, session: tls_client.Session
) -> Tuple[Optional[str], str]:
"""
Retrieves job description by going to the job page url
@@ -195,6 +195,8 @@ class ZipRecruiterScraper(Scraper):
response = session.get(
job_page_url, headers=ZipRecruiterScraper.headers(), allow_redirects=True
)
if response.status_code not in range(200, 400):
return None
html_string = response.content
soup_job = BeautifulSoup(html_string, "html.parser")