import requests
data = requests.get('https://www.bullmarketbrokers.com/Information/StockPrice/GetStockPrices?term=3&index=merval&sortColumn=ticker&isAscending=true').json()
for symbol in data['result']:
print(symbol['ticker'], symbol['stockOffer']['bidTop'][0]['quantity'])
当the API the site is using itself可用时,不要使用BeautifulSoup来刮取页面。 (对于似乎动态加载数据的站点,您可以通过浏览器控制台找到URL和请求。)
以下
打印输出
似乎与你想要的那列相对应。你知道吗
相关问题 更多 >
编程相关推荐