Closed voidbydefault closed 1 year ago
Update:
I added --remote-debugging-port=9222
to init_browser (main.py, line 10) as follows:
def init_browser():
browser_options = Options()
options = ['--disable-blink-features', '--no-sandbox', '--start-maximized', '--disable-extensions',
'--ignore-certificate-errors', '--disable-blink-features=AutomationControlled', '--remote-debugging-port=9222']
But then... I am stuck here:
Traceback (most recent call last):
File "/home/user/Documents/LinkedIn-Easy-Apply-Bot/main.py", line 126, in <module>
bot.login()
File "/home/user/Documents/LinkedIn-Easy-Apply-Bot/linkedineasyapply.py", line 44, in login
self.browser.find_element_by_id("username").send_keys(self.email)
AttributeError: 'WebDriver' object has no attribute 'find_element_by_id'
It seems that something is changed either by LinkedIn or WebDriver.
Second update:
It seems Webdriver guys were bored so they decided to deprecate a few things, now following works (we have to change the method, I am learning Python so please excuse my noobivity):
#self.browser.find_element_by_id("username").send_keys(self.email)
self.browser.find_element("id", "username").send_keys(self.email)
#self.browser.find_element_by_id("password").send_keys(self.password)
self.browser.find_element("id", "password").send_keys(self.password)
#self.browser.find_element_by_css_selector(".btn__primary--large").click()
self.browser.find_element(By.CSS_SELECTOR, ".btn__primary--large").click()
It seems you will have to update the code. Thanks.
Thanks for the detailed post.
Are you using the most recent version of this bot? These lines have been fixed already.
self.browser.find_element(By.ID, "username").send_keys(self.email)
self.browser.find_element(By.ID, "password").send_keys(self.password)
self.browser.find_element(By.CSS_SELECTOR, ".btn__primary--large").click()
Please ensure you are using this repository and on the newest version:
git pull
Please reopen if issue persists.
Thanks. I did try 'git pull' and it always reported up to date. Eventually, I deleted the folder and did 'git clone' again and things worked including new config.yaml.
I have created a pull request for minor fix for
def init_browser(): browser_options = Options() options = ['--disable-blink-features', '--no-sandbox', '--start-maximized', '--disable-extensions', '--ignore-certificate-errors', '--disable-blink-features=AutomationControlled', '--remote-debugging-port=9222']
That behavior by git is odd, but I am glad the reclone worked.
I currently do not see your pull request, but I will look out for it.
Thanks for following up.
Hi,
Chromium launches but gets stuck with word, "data:," in address bar without navigating to LinkedIn login page as specified in line 42 of
linkedineasyapply.py
hence login routine stalls causing unintended termination of session.My environment:
I have tried running in venv as well using terminal. Issue persists.
Log: