def jobTaglist(taglist):
strTaglist = ""
for el in taglist:
strTaglist += el.text+"*"
return strTaglist
def jobinfo_csv(elements):
jobInfo = {}
for element in elements:
jobInfo["job-name"] = element.find_element(By.CSS_SELECTOR, ".job-name").text
jobInfo['job-area'] = element.find_element(By.CSS_SELECTOR, ".job-area").text
jobInfo['salary'] = element.find_element(By.CSS_SELECTOR, ".salary").text
t = element.find_element(By.CSS_SELECTOR, ".job-card-footer .tag-list").find_elements(By.XPATH, "./li")
jobInfo['technologylist']= jobTaglist(t)
taglist = element.find_element(By.CSS_SELECTOR, ".tag-list").find_elements(By.XPATH, "./li")
jobInfo['taglist']= jobTaglist(taglist)
companyTaglist = element.find_element(By.CSS_SELECTOR, ".company-tag-list").find_elements(By.XPATH, "./li")
jobInfo['companyTaglist']= jobTaglist(companyTaglist)
jobInfo['company-name'] = element.find_element(By.CSS_SELECTOR, ".company-name").text
jobInfo['info-desc'] = element.find_element(By.CSS_SELECTOR, ".info-desc").text
pddata = pd.DataFrame([jobInfo])
pddata.to_csv('static.csv',mode='a',encoding='utf-8',header=False,index=False)