尝试使用:-
divElement.find("a", { "title" : "Details" })
try this:
link = soup.find('div').find('a').get('href')
this should work without knowing the infos before the div
urls=[] result=driver.find_elements_by_class_name("quicklinks") for res in result: url=res.find_element_by_tag_name("a").get_attribute("href") urls.append(url) for u in urls: driver.get(u)
i have no idea about beautiful soup but u can make url scrapping from above code
使用以下内容:
soup.select("div.quicklinks").find("a", title="Details")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.