我正在尝试使用下面的 python 代码从 NSE 网站获取数据,我得到了
[<span class="bold" id="orderBookTradeTMC">-</span>]
安装的
[<span class="bold" id="orderBookTradeTMC">266</span>]
数据266未加载请咨询
import requests
import bs4
url="https://www.nseindia.com/get-quotes/equity?symbol=ITC"
headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/57.0.2987.133 Safari/537.36'}
response = requests.get(url, headers=headers)
soup= bs4.BeautifulSoup(response.text,'lxml')
print(soup.find_all(id='orderBookTradeTMC'))