爬取Rotowire MLB优化器表格及无法获取每日slateID的问题求助
爬取Rotowire MLB优化器表格及无法获取每日slateID的问题求助
各位大佬好,我之前用Python脚本爬取Rotowire的MLB优化器数据,指定slateID后能正常拿到结果,但最近网站改版了,我现在检查网站的时候完全找不到每日更新的slateID了,导致脚本没法继续用,想请教下有没有办法获取最新的slateID?
之前能用的代码如下:
import pandas as pd import requests url = 'https://www.rotowire.com/daily/tables/optimizer-mlb.php' payload = { 'siteID': '1', 'slateID': '6441', 'projSource': 'RotoWire', 'rst': 'RotoWire' } jsonData = requests.get(url, params=payload).json() df = pd.DataFrame(jsonData) print(df)
当时成功输出的表格数据示例:
id playerID rotoPlayerID ... ie_green_lights ie_matchup_notes ie_volatility 0 12739 11095 12739 ... 0 0 1 10510 4081 10510 ... 0 0 2 16036 5163 16036 ... 0 0 3 14194 10827 14194 ... 0 0 4 14865 15463 14865 ... 0 0 .. ... ... ... ... ... ... ... 687 14444 11330 14444 ... 0 0 688 14440 18894 14440 ... 0 0 689 14439 18905 14439 ... 0 0 690 14435 5058 14435 ... 0 0 691 17921 18828 17921 ... 0 0
现在网站结构变了,我找不到每日更新的slateID了,有没有大佬知道现在该怎么获取这个参数,或者有没有其他替代方法能爬取到这些数据?
备注:内容来源于stack exchange,提问作者terrell.bradford
相关产品推荐
相关产品推荐

