2.1 Indeed - Code
2.1 Indeed - Code
driver = webdriver.Chrome(
'')
driver.get('https://ca.indeed.com/')
while True:
for i in boxes:
link = i.find('a').get('href')
job_title = i.find('a', class_ = 'jcs-JobTitle css-jspxzf eu4oa1w0').text
company = i.find('span', class_ = 'companyName').text
location = i.find('div', class_ = 'companyLocation').text
date_posted = i.find('span', class_ = 'date').text
df = df.append({'Link':link, 'Job Title':job_title, 'Company':company,
'Date Posted':date_posted, 'Location':location}, ignore_index = True)
def posted(x):
x = x.replace('PostedPosted','').strip()
return x
df = df.iloc[1:,:]
def day(x):
try:
x = x.replace('days ago','').strip()
x = x.replace('day ago','').strip()
return float(x)
except:
return x