【发布时间】:2020-06-12 05:16:45
【问题描述】:
我正在尝试使用 Python Jupyter 中的 beautifulsoup 从以下网站抓取价格。我想要的元素有一个独特的“平均价格”类。我尝试使用 findall 功能,但无法抓取它。有人可以帮我看看有什么问题吗?
网址:https://otc.hbg.com/en-us/trade/buy-usdt/
import requests
URL = 'https://otc.hbg.com/en-us/trade/buy-btc/'
page = requests.get(URL)
from bs4 import BeautifulSoup
soup = BeautifulSoup(page.content, 'html.parser')
containers = soup.find_all("div", {"class": "price average"})
containers
【问题讨论】:
标签: python web-scraping beautifulsoup