我一直在使用nflgame和nfldb模块从nfl xml数据中提取时间表,但是我发现下面的函数生成的URL返回404错误。是否还有其他人最近遇到了这个问题,知道原因是什么?
def schedule_url(year, stype, week):
"""
Returns the NFL.com XML schedule URL. `year` should be an
integer, `stype` should be one of the strings `PRE`, `REG` or
`POST`, and `gsis_week` should be a value in the range
`[0, 17]`.
"""
xmlurl = 'http://www.nfl.com/ajax/scorestrip?'
if stype == 'POST':
week += 17
if week == 21: # NFL.com you so silly
week += 1
return '%sseason=%d&seasonType=%s&week=%d' % (xmlurl, year, stype, week)
schedule_url(2019, 'REG', 1)