【发布时间】:2016-10-13 03:27:33
【问题描述】:
from selenium import webdriver
from time import sleep
from selenium.common.exceptions import NoSuchAttributeException
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.keys import Keys
driver = webdriver.Firefox()
driver.get('https://www.linkedin.com/jobs/search?locationId=sg%3A0&f_TP=1%2C2&orig=FCTD&trk=jobs_jserp_posted_one_week')
jobtitlebutton = driver.find_elements_by_class_name('job-title-link')
print(jobtitlebutton)
输出是一个列表形式的 selenium webelement。我想将其转换为字符串变量,以便列表可以包含文本格式的所有职位。 如果我能在这方面得到帮助,那就太好了。提前致谢。
【问题讨论】:
-
您需要链接列表还是工作列表(例如“数据中心技术员”、“测试经理”)?