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

[HELP WANTED]: Error with Jobs Description #438

Closed
ChristOscar opened this issue Sep 27, 2024 · 5 comments
Closed

[HELP WANTED]: Error with Jobs Description #438

ChristOscar opened this issue Sep 27, 2024 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@ChristOscar
Copy link

Issue description

Issue Description

Our LinkedIn job application bot is encountering an error when trying to retrieve the job description. The error occurs in the _get_job_description method of the AIHawkEasyApplier class. The bot is unable to locate the element containing the job description.

Error Message

selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":".jobs-description-content__text"}
  (Session info: chrome=129.0.6668.59)

Code Snippet

Here's the relevant part of the _get_job_description method where the error occurs:

def _get_job_description(self) -> str:
    logger.debug("Getting job description")
    try:
        try:
            see_more_button = self.driver.find_element(By.XPATH,
                                                       '//button[@aria-label="Click to see more description"]')
            actions = ActionChains(self.driver)
            actions.move_to_element(see_more_button).click().perform()
            time.sleep(2)
        except NoSuchElementException:
            logger.debug("See more button not found, skipping")

        description = self.driver.find_element(By.CLASS_NAME, 'jobs-description-content__text').text
        logger.debug("Job description retrieved successfully")
        return description
    except NoSuchElementException:
        tb_str = traceback.format_exc()
        logger.error(f"Job description not found: {tb_str}")
        raise Exception(f"Job description not found: \nTraceback:\n{tb_str}")
    except Exception:
        tb_str = traceback.format_exc()
        logger.error(f"Error getting Job description: {tb_str}")
        raise Exception(f"Error getting Job description: \nTraceback:\n{tb_str}")

Steps to Reproduce

  1. Run the LinkedIn job application bot
  2. Bot navigates to a job listing page
  3. Bot attempts to retrieve the job description
  4. Error occurs when trying to find the element with class name 'jobs-description-content__text'

Expected Behavior

The bot should successfully locate and retrieve the job description text from the LinkedIn job listing page.

Actual Behavior

The bot fails to locate the element containing the job description, raising a NoSuchElementException.

Questions

  1. Has LinkedIn changed their HTML structure for job listings recently?
  2. Are there alternative selectors we could use to locate the job description?
  3. Could this be related to page load timing issues?
  4. Are there any known issues with Selenium and the current versions of Chrome/ChromeDriver we're using?

Thank you in advance for your help!

Specific tasks

No response

Additional resources

No response

Additional context

No response

@ChristOscar ChristOscar added the help wanted Extra attention is needed label Sep 27, 2024
@craschnet
Copy link

craschnet commented Sep 30, 2024

Having the same issue.

app.log
Video recording of my Win10x64 VM running this
https://youtu.be/IokZgiC5hr8

As you can see the bot is not applying for the job. Looks like it has issues with LinkedIn's new Easy Apply button. It's erroring out before it even tries to apply for the Job.

Tried it with my Ubuntu 22.04.5 desktop. Same issue.

@craschnet
Copy link

craschnet commented Sep 30, 2024

@ ChristOscar
I have LinkedIn Premium.
Do you have LinkedIn premium?
I'm wondering if it's an issue due to having a Linkedin Premium subscription. If this was a wide spread issue, I'd expect more people would post having the same issue, so I'm trying to track down the common delta.

This should be labeled as a bug.

@craschnet
Copy link

Hi https://github.com/ChristOscar
I'm troubleshooting this issue in: #457
Seems to be an issue with using Linkedin Premium.
It changes the name of the elements. I canceled my linkedin premium subscription (and it won't change back till 10/17/2024) so it maybe two weeks before I can use it again.
I'm just started to learn python due to looking into this issue.

@queukat
Copy link
Collaborator

queukat commented Oct 8, 2024

fixed in #473

@xTaylorFerg
Copy link
Contributor

The issue with finding the description when user is LinkedIn Premium is not fixed in this commit. It is not fixed in main or the v4 branch. Someone opened an issue for it here:
#457

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants