我一直试图从网页中提取表。
我不知道下一步该怎么办这是我写的。你知道吗
import requests
from bs4 import BeautifulSoup
page= requests.get('http://www.moneycontrol.com/financials/nmdc/ratios/NMD02')
soup = BeautifulSoup(page.text, 'html.parser')
table = soup.find(class_='tabns MR10')
现在我不知道该怎么办。我找不到桌子。你知道吗
你可以很容易地使用pyquery。你知道吗
类标签和MR10不引用您试图获取的页面上的表。该类组合指的是一个div,它包含一个无序列表,该列表将选项卡放在表的顶部。同学们,看起来它能把你们的桌子弄到手,但我不知道你们想刮什么。你知道吗
试试这个:
这是我从代码中得到的:
相关问题 更多 >
编程相关推荐