【发布时间】:2020-11-17 15:37:09
【问题描述】:
我正在尝试从 CME 网站的表格中抓取数据。具体来说,我想提取每种未来货币的未平仓合约数据。但是当我尝试解析表格时,它什么也没给我。
下面给出的链接from which I am trying to scrape the data 是我正在尝试执行的代码。
from bs4 import BeautifulSoup
import requests
url="https://www.cmegroup.com/market-data/volume-open-interest/fx-volume.html"
# Make a GET request to fetch the raw HTML content
html_content = requests.get(url).text
# Parse the html content
soup = BeautifulSoup(html_content)
table = soup.find("table", attrs={"class": "cmeData voiDataset"})
print(table)
【问题讨论】:
标签: python selenium web-scraping beautifulsoup python-requests-html