如何使用python加载json url和获取数据

2024-10-04 03:22:40 发布

您现在位置:Python中文网/ 问答频道 /正文

我想加载这个apiurl并获取数据。我用这个代码得到这个,但我得到了400个错误的请求。 实际的网站链接是(https://www.lffs.eu/les-clubs/

'''

import urllib, json


enter code hereurl = "https://gestion.lffs.eu/lms_league_ws/public/api/v1/club/byMyLeague?filter=&club_status_id=1&page=2&pagination=21"

response = urllib.urlopen(url)
data = json.loads(response.read())
print(data)

'''


Tags: 代码httpsjsondata网站链接responsewww