我想知道如何從該網(wǎng)站提取年初的信息:https://web.archive.org/details/www.stackoverflow.com我有幾個(gè)網(wǎng)站可以查看 pandas 專(zhuān)欄,例如:URL Popularitywww.stackoverflow.com 8.5www.web.archive.com 5.4...我需要在數(shù)據(jù)集中創(chuàng)建一個(gè)包含 URL 年齡的新列,即URL Popularity Ywww.stackoverflow.com 8.5 2004 www.web.archive.com 5.4 2001...通過(guò)檢查網(wǎng)頁(yè),我知道我需要查看 input min,如下所示:<input min="2004" max="2020" class="form-control" name="year_end" type="number" value="2004">我嘗試如下: from bs4 import BeautifulSoup import requests main_url = 'https://web.archive.org/details/www.stackoverflow.com' response = requests.get(main_url) soup = BeautifulSoup(response.text, "html.parser")我應(yīng)該使用 find_all 來(lái)查找我感興趣的類(lèi):my_list = soup.find_all(attrs={'input min','class':'form-control'})但問(wèn)題是它不刮年齡。你能指出我正確的方向嗎?謝謝
添加回答
舉報(bào)
0/150
提交
取消