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

Made Chrome Driver local in directory and... #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.pythonPath": "C:\\Users\\rayav\\envs\\cca\\Scripts\\python.exe"
}
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# common_intern
A selenium script to automatically apply to software engineering internships!
# Intern Application Automation

This is a Python script that automatically applies to software engineering internships on glassdoor and greenhouse!

The requirement is a python 3 interpreter and selenium packages installed if selenium is not installed you can install with the help of the following command
`pip install selenium`
After it is done run **apply.py** file with `python3 apply.py`
8 changes: 4 additions & 4 deletions apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.keys import Keys
import os # to get the resume file
import time # to sleep
from time import sleep # to sleep

# sample applications
URL_g1 = 'https://boards.greenhouse.io/braintree/jobs/1316736?gh_jid=1316736&gh_src=1d1244401'
Expand Down Expand Up @@ -52,7 +52,7 @@ def greenhouse(driver):
loc.send_keys(Keys.DOWN) # manipulate a dropdown menu
loc.send_keys(Keys.DOWN)
loc.send_keys(Keys.RETURN)
time.sleep(2) # give user time to manually input if this fails
sleep(2) # give user time to manually input if this fails

except NoSuchElementException:
pass
Expand Down Expand Up @@ -161,7 +161,7 @@ def lever(driver):
driver.find_element_by_class_name('template-btn-submit').click()

if __name__ == '__main__':
driver = webdriver.Chrome(executable_path='/Users/harshita/chromedriver')
driver = webdriver.Chrome(executable_path='./chromedriver.exe')

for url in URLS:
driver.get(url)
Expand All @@ -172,5 +172,5 @@ def lever(driver):
if 'lever' in url:
lever(driver)

time.sleep(1) # can lengthen this as necessary (for captcha, for example)
sleep(1) # can lengthen this as necessary (for captcha, for example)
driver.close()
Binary file added chromedriver.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion old.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def greenhouse(empty_form):
print (empty_form.keys())
for key in empty_form.keys():
try:
key.encode('utf8')
key.encode('utf-8')
print(key)
except:
print ('fail')
Expand Down