在
xpath你选择的是“OK”,但可能不是最好的。
result = driver.find_elements_by_xpath("//ol[@id="rso"]/li")[0] //make a list of results and get the first oneresult.find_element_by_xpath("./div/h3/a").click() //click its href
在
xpath你选择的是“OK”,但可能不是最好的。
result = driver.find_elements_by_xpath("//ol[@id="rso"]/li")[0] //make a list of results and get the first oneresult.find_element_by_xpath("./div/h3/a").click() //click its href