Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix job_search AttributeError #171

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions linkedin_scraper/job_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def scrape_job_card(self, base_element) -> Job:
job_div = self.wait_for_element_to_load(name="job-card-list__title", base=base_element)
job_title = job_div.text.strip()
linkedin_url = job_div.get_attribute("href")
company = base_element.find_element_by_class_name("job-card-container__primary-description").text
location = base_element.find_element_by_class_name("job-card-container__metadata-item").text
company = base_element.find_element(By.CLASS_NAME, "job-card-container__primary-description").text
location = base_element.find_element(By.CLASS_NAME, "job-card-container__metadata-item").text
job = Job(linkedin_url=linkedin_url, job_title=job_title, company=company, location=location, scrape=False, driver=self.driver)
return job

Expand Down