Skip to content

Commit

Permalink
Refactor: delete useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
krapes committed Jul 12, 2020
1 parent 6937826 commit fb15308
Showing 1 changed file with 1 addition and 27 deletions.
28 changes: 1 addition & 27 deletions easyapplybot.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,6 @@ def start_linkedin(self,username,password):
except TimeoutException:
print("TimeoutException! Username/password field or login button not found")

def wait_for_login(self):
time.sleep(1)

while True:
if self.browser.title != title:
print("\nStarting LinkedIn bot\n")
break
else:
time.sleep(1)
print("\nPlease Login to your LinkedIn account\n")

def fill_data(self):
self.browser.set_window_size(0, 0)
Expand Down Expand Up @@ -167,9 +157,7 @@ def applications_loop(self, position, location):
before = len(IDs)
jobIDs = [x for x in IDs if x not in self.appliedJobIDs]
after = len(jobIDs)
print(f"""There were {before} jobIDs found
but {before - after} were removed because they were found on the
appliedJobsID list""")


if len(jobIDs) == 0 and len(IDs) > 24:
jobs_per_page = jobs_per_page + 25
Expand Down Expand Up @@ -262,20 +250,6 @@ def get_easy_apply_button(self):

return EasyApplyButton

def easy_apply_xpath(self):
button = self.get_easy_apply_button()
button_inner_html = str(button)
list_of_words = button_inner_html.split()
next_word = [word for word in list_of_words if "ember" in word and "id" in word]
ember = next_word[0][:-1]
xpath = '//*[@'+ember+']/button'
return xpath

def click_button(self, xpath):
triggerDropDown = self.browser.find_element_by_xpath(xpath)
time.sleep(0.5)
triggerDropDown.click()
time.sleep(1)

def send_resume(self):
def is_present(button_locator):
Expand Down

0 comments on commit fb15308

Please sign in to comment.