Update linkedIn_easy_applier.py

This commit is contained in:
Federico 2024-08-24 00:22:11 +01:00 committed by GitHub
parent 7b7214b238
commit c51aeca99a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -117,13 +117,12 @@ class LinkedInEasyApplier:
recruiter_link = recruiter_element.get_attribute('href') recruiter_link = recruiter_element.get_attribute('href')
return recruiter_link return recruiter_link
except Exception as e: except Exception as e:
print(f"Errore durante l'estrazione del link del recruiter: {e}")
return "" return ""
def _scroll_page(self) -> None: def _scroll_page(self) -> None:
scrollable_element = self.driver.find_element(By.TAG_NAME, 'html') scrollable_element = self.driver.find_element(By.TAG_NAME, 'html')
#utils.scroll_slow(self.driver, scrollable_element, step=300, reverse=False) utils.scroll_slow(self.driver, scrollable_element, step=300, reverse=False)
#utils.scroll_slow(self.driver, scrollable_element, step=300, reverse=True) utils.scroll_slow(self.driver, scrollable_element, step=300, reverse=True)
def _fill_application_form(self, job): def _fill_application_form(self, job):
while True: while True:
@ -395,4 +394,4 @@ class LinkedInEasyApplier:
sanitized_text = re.sub(r'[\x00-\x1F\x7F]', '', sanitized_text) sanitized_text = re.sub(r'[\x00-\x1F\x7F]', '', sanitized_text)
sanitized_text = sanitized_text.replace('\n', ' ').replace('\r', '') sanitized_text = sanitized_text.replace('\n', ' ').replace('\r', '')
sanitized_text = sanitized_text.rstrip(',') sanitized_text = sanitized_text.rstrip(',')
return sanitized_text return sanitized_text