如何从解析网页中获取项目?

How to get items from parsing web page?

有一个website,上面有一个游戏服务器列表。如何在Python中获取Json格式的前5个服务器的数据,其中将指定它们:'Server name'(标题),'online'(计数)。 正在解析网站 link:https://cdn.rage.mp/master/?query=gun 网站 link:https://rage.mp/masterlist/?query=gun 我想按字段“玩家”显示前 5 个服务器。

import requests

r = requests.get('https://cdn.rage.mp/master/')

d = sorted(r.json().values(), key=lambda x: x['players'], reverse=True)[0:5]

print(d)
[{'name': '[RolePlay][Voice] GTA5RP.COM | DownTown | gta5rp.com/discord',
  'gamemode': 'roleplay',
  'url': 'https://gta5rp.com/',
  'lang': 'ru',
  'players': 1662,
  'peak': 1716,
  'maxplayers': 5000},
 {'name': '[RolePlay][Voice] GTA5RP.COM | VineWood | gta5rp.com/discord',
  'gamemode': 'roleplay',
  'url': 'https://gta5rp.com/',
  'lang': 'ru',
  'players': 1568,
  'peak': 1578,
  'maxplayers': 5000},
 {'name': '[RolePlay][Voice] GTA5RP.COM | Eclipse | gta5rp.com/discord',
  'gamemode': 'roleplay',
  'url': 'https://gta5rp.com/',
  'lang': 'ru',
  'players': 1459,
  'peak': 1489,
  'maxplayers': 5000},
 {'name': '[RolePlay][Voice] GTA5RP.COM | StrawBerry | gta5rp.com/discord',
  'gamemode': 'roleplay',
  'url': 'https://gta5rp.com/',
  'lang': 'ru',
  'players': 1389,
  'peak': 1397,
  'maxplayers': 5000},
 {'name': '[RolePlay][Voice] GTA5RP.COM | Sunrise | gta5rp.com/discord [1.1]',
  'gamemode': 'roleplay',
  'url': 'https://gta5rp.com/',
  'lang': 'ru',
  'players': 1323,
  'peak': 1337,
  'maxplayers': 3500}]