Open pafthinder opened 1 month ago
Me too! It's not applying to any jobs!
I think it has something to do with the layout of LinkedIn page ; for some people layout ( therefore class names like this
link = job_tile.find_element(By.CLASS_NAME, 'job-card-list__title').get_attribute('href').split('?')[0]
) is compatible and for some is not
but what's the pattern here? I have shown my layout above. it looks pretty... basic I would say.
any idea will be appreciated
I have LinkedIn learning subscription, maybe that changes whole layout of LI page and therefore markups are misaligned? @iliasjaddi - do you have LI premium or LI learning subscription?
there is problem in apply_jobs method of LinkedInJobManager class (linkedIn_job_manager.py @ 127)
job_list_elements = self.driver.find_elements(By.CLASS_NAME, 'scaffold-layout__list-container')[0].find_elements(By.CLASS_NAME, 'jobs-search-results__list-item occludable-update p0 relative scaffold-layout__list-item')
job_list_elements remains empty (I updated CLASS_NAME in my code for testing purpose, no luck with this, nor orignal CLASS_NAME)
but if we look one level higher using
job_list_elements_debug = self.driver.find_elements(By.CLASS_NAME, 'scaffold-layout__list-container')[0]
we can see its being filled with data
so there is some issue with find_elements in 0th element of job_list_elements
I tried to access text from job_list_elements
job_list_elements = self.driver.find_elements(By.CLASS_NAME, 'scaffold-layout__list-container')[0].text
but it doesn't pass what's necessary to
job_list = [Job(*self.extract_job_information_from_tile(job_element)) for job_element in job_list_elements]
@feder-cr please take a look in a spare moment, thanks.
Going to job page 0
Starting the application process for this page...
The element is not scrollable.
The element is not scrollable.
Starting the search for Technical Support in Wroclaw Metropolitan Area.
Going to job page 0
Starting the application process for this page...
The element is not scrollable.
The element is not scrollable.
Starting the search for Technical Support in Vienna, Austria.
Going to job page 0
Starting the application process for this page...
The element is not scrollable.
The element is not scrollable.
Starting the search for Technical Support in Amsterdam Area.
Going to job page 0
Starting the application process for this page...
unpredictable behavior here. no matter if it finds jobs in the left pane or it doesn't, it does one of 2 actions
I have managed to send my first automated application using this altered code
apply_jobs()
and extract_job_information_from_tile()
functions are updated @ linkedIn_job_manager.py
still it gets pretty buggy
use at ur own responsibility and lemme know if it helps in ur case
def apply_jobs(self):
try:
# Wait for the job list container to be present
WebDriverWait(self.driver, 10).until(
EC.presence_of_element_located((By.CLASS_NAME, "scaffold-layout__list-container"))
)
# Find the job list container
job_list_container = self.driver.find_element(By.CLASS_NAME, "scaffold-layout__list-container")
# Find all job items within the container
job_list_elements = job_list_container.find_elements(By.CSS_SELECTOR,
"li.ember-view.jobs-search-results__list-item.occludable-update.p0.relative.scaffold-layout__list-item")
print(f"Number of job elements found: {len(job_list_elements)}")
if not job_list_elements:
raise Exception("No job elements found on page")
for job_element in job_list_elements:
job = Job(*self.extract_job_information_from_tile(job_element))
print(f"Processing job: {job.title} at {job.company}")
if self.is_blacklisted(job.title, job.company, job.link):
utils.printyellow(f"Blacklisted {job.title} at {job.company}, skipping...")
self.write_to_file(job, "skipped")
continue
try:
if job.apply_method not in {"Continue", "Applied", "Apply"}:
self.easy_applier_component.job_apply(job)
self.write_to_file(job, "success")
else:
utils.printyellow(f"Skipping {job.title} due to apply method: {job.apply_method}")
except Exception as e:
utils.printred(f"Error applying to {job.title}: {str(e)}")
utils.printred(traceback.format_exc())
self.write_to_file(job, "failed")
continue
except Exception as e:
utils.printred(f"Error in apply_jobs: {str(e)}")
utils.printred(traceback.format_exc())
# Update the extract_job_information_from_tile method
def extract_job_information_from_tile(self, job_tile):
job_title, company, job_location, apply_method, link = "", "", "", "", ""
try:
job_title = job_tile.find_element(By.CSS_SELECTOR, 'a.job-card-list__title').text
link = job_tile.find_element(By.CSS_SELECTOR, 'a.job-card-list__title').get_attribute('href').split('?')[0]
company = job_tile.find_element(By.CSS_SELECTOR, '.job-card-container__primary-description').text
job_location = job_tile.find_element(By.CSS_SELECTOR, '.job-card-container__metadata-item').text
apply_method = job_tile.find_element(By.CSS_SELECTOR, '.job-card-container__apply-method').text
except NoSuchElementException as e:
print(f"Error extracting job information: {str(e)}")
return job_title, company, job_location, link, apply_method
@Andres-Ventura this is the same error?
Is it possible to reduce the sleeping time? 800 seconds between jobs adds up
yes it is, linkedIn_job_manager -> start_applying() -> minimum_time
how is that completed?
fixed in #473
What was fixed? I've been trying to get this fixed. It runs but either fails or skips for the applications.
I've tried running off of your version, but I'm getting other errors now.
both content and linkedIn language are english I tried to change to dark mode, but it's not possible, huh. even though I changed it when browser is opened by script light mode somehow returns
Screenshot_2.png - scrolls to the bottom Screenshot_3.png - exactly the same behavior (scrolling to the bottom) even if there are no jobs meeting criteria Screenshot_4.png - scrolls to the top, continuing to the next "page" (even though in the current one there were no offers)
please help. Ask any further questions for clarification, I will gladly provide more information. Lemme know if I can help somehow.
Regards, Simon