Skip to content
Merged
Changes from all commits
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
16 changes: 8 additions & 8 deletions linkedin.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def __init__(self):
time.sleep(2)
self.driver.find_element("xpath",'//button[@type="submit"]').click()
time.sleep(30)
except:
except Exception:
utils.prRed("❌ Couldn't log in Linkedin by using Chrome. Please check your Linkedin credentials on config files line 7 and 8.")

self.saveCookies()
Expand Down Expand Up @@ -109,7 +109,7 @@ def isLoggedIn(self):
try:
self.driver.find_element(By.XPATH,'//*[@id="ember14"]')
return True
except:
except Exception:
pass
return False

Expand All @@ -122,7 +122,7 @@ def generateUrls(self):
for url in linkedinJobLinks:
file.write(url+ "\n")
utils.prGreen("✅ Apply urls are created successfully, now the bot will visit those urls.")
except:
except Exception:
utils.prRed("❌ Couldn't generate urls, make sure you have editted config file line 25-39")

def linkJobApply(self):
Expand Down Expand Up @@ -224,7 +224,7 @@ def linkJobApply(self):
if continue_button.is_displayed():
continue_button.click()
time.sleep(random.uniform(1, constants.botSpeed))
except:
except Exception:
# If button doesn't exist, continue normally
pass

Expand All @@ -248,7 +248,7 @@ def linkJobApply(self):
if config.maxApplicationsPerRun and countApplied >= config.maxApplicationsPerRun:
reachedCap = True

except:
except Exception:
try:
# Fill phone number before continuing
self.fillPhoneNumber()
Expand Down Expand Up @@ -312,7 +312,7 @@ def chooseResume(self):
elif (type(len(resumes)) != int):
utils.prRed(
"❌ No resume has been selected please add at least one resume to your Linkedin account.")
except:
except Exception:
pass

def getJobProperties(self, count):
Expand Down Expand Up @@ -361,7 +361,7 @@ def easyApplyButton(self):
time.sleep(random.uniform(1, constants.botSpeed))
button = self.driver.find_element(By.XPATH, "//div[contains(@class,'jobs-apply-button--top-card')]//button[contains(@class, 'jobs-apply-button')]")
EasyApplyButton = button
except:
except Exception:
EasyApplyButton = False

return EasyApplyButton
Expand Down Expand Up @@ -486,7 +486,7 @@ def applyProcess(self, percentage, offerPage):
if config.followCompanies is False:
try:
self.driver.find_element(By.CSS_SELECTOR, "label[for='follow-company-checkbox']").click()
except:
except Exception:
pass

self.driver.find_element(By.CSS_SELECTOR, "button[aria-label='Submit application']").click()
Expand Down
Loading