Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update linkedin.py #35

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
28 changes: 14 additions & 14 deletions linkedin.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ def __init__(self):
if (browser == "firefox"):
if (len(linkedinEmail)>0):
print(platform.system())
if (platform.system == "Linux"):
prYellow("On Linux you need to define profile path to run the bot with Firefox. Go about:profiles find root directory of your profile paste in line 8 of config file next to firefoxProfileRootDir ")
exit()
else:
self.driver = webdriver.Firefox()
self.driver.get("https://www.linkedin.com/login?trk=guest_homepage-basic_nav-header-signin")
prYellow("Trying to log in linkedin.")
try:
self.driver.find_element("id","username").send_keys(linkedinEmail)
self.driver.find_element("id","password").send_keys(config.password)
time.sleep(5)
self.driver.find_element("xpath",'//*[@id="organic-div"]/form/div[3]/button').click()
except Exception as e:
prRed(e)
self.driver = webdriver.Firefox()
self.driver.get("https://www.linkedin.com/login?trk=guest_homepage-basic_nav-header-signin")
prYellow("Trying to log in linkedin.")
try:
self.driver.find_element("id","username").send_keys(linkedinEmail)
self.driver.find_element("id","password").send_keys(config.password)
time.sleep(5)
self.driver.find_element("xpath",'//*[@id="organic-div"]/form/div[3]/button').click()
except Exception as e:
prRed(e)
else:
if (platform.system() == "Linux"):
if (config.firefoxProfileRootDir == ""):
prYellow("On Linux you need to define profile path to run the bot with Firefox. Go about:profiles find root directory of your profile paste in line 8 of config file next to firefoxProfileRootDir ")
exit()
self.driver = webdriver.Firefox()
elif (browser == "chrome"):
self.driver = webdriver.Chrome()
Expand Down