【发布时间】:2022-01-17 00:07:05
【问题描述】:
我正在尝试使用 BeautifulSoup 来抓取任何网站,只是为了学习,但在尝试时,我永远不会获得每个参数集的所有实例。附上我的代码,请告诉我我做错了什么:
import requests
url = "https://www.newegg.com/core-i7-8th-gen-intel-core-i7-8700k/p/N82E16819117827?Item=N82E16819117827"
result = requests.get(url)
doc = BeautifulSoup(result.text, "html.parser")
price = doc.find_all(string="$")
print(price)
#### WHY DOES BEAUTIFULSOUP NOT RETURN ALL INSTANCES!?!?!?```
【问题讨论】:
-
您想知道
bs4还是python?我认为“使用 BeautifulSoup 学习 Python”没有什么意义。 -
想学python,只是在看一些youtube视频,他们用beautifulsoup在网上刮,所以我想练习一下
标签: python beautifulsoup