2024-06-29 01:08:10 发布
网友
enter image description here
如何使用selenium定位伪元素? 我想要的输出是地址“http://www.meishij.net/alldish.php?内径=1799616”。在
为什么不试试BeautifulSoup:
BeautifulSoup
import requests from bs4 import BeautifulSoup pages = requests.get('http://www.meishij.net/zuofa/qingjiaosansi.html') soup =BeautifulSoup(pages.content, 'html.parser') result = soup.find('a',{'title':"青椒三丝"}).get('href') print(result)
result将是:
result
为什么不试试
BeautifulSoup
:
^{pr2}$result
将是:相关问题 更多 >
编程相关推荐