常春藤联盟体育数据检索包
ivyp的Python项目详细描述
简介
常春藤是一个通过 刮擦。它提供了一些这样做的方法。
检索
retrieve是一种允许用户将数据作为 字典。检索具有以下调用模式:
检索(sport,endpoint,gender=“m”,year=“current”)
如果运动是相关的运动,终点是你想要的数据,性别 这项运动的性别和年份是当前的 年份或上一年的整数。例如获得积分榜 2013年男子篮球比赛:
>>> standings = retrieve("basketball", "standings", year=2013) >>> for row in standings: print(row) {'overall': u'27-5', 'ivy': u'13-1', 'team': 'Harvard'} {'overall': u'19-14', 'ivy': u'9-5', 'team': 'Yale'} {'overall': u'21-9', 'ivy': u'8-6', 'team': 'Princeton'} {'overall': u'21-13', 'ivy': u'8-6', 'team': 'Columbia'} {'overall': u'15-14', 'ivy': u'7-7', 'team': 'Brown'} {'overall': u'12-16', 'ivy': u'5-9', 'team': 'Dartmouth'} {'overall': u'8-20', 'ivy': u'5-9', 'team': 'Penn'} {'overall': u'2-26', 'ivy': u'1-13', 'team': 'Cornell'}