FetchMainfest.py 387 B

12345678910111213
  1. from Core.Debug import LogWarning
  2. import requests
  3. import json
  4. LAUNCHER_MANIFSET_URL = 'https://piston-meta.mojang.com/mc/game/version_manifest.json'
  5. def fetch():
  6. try:
  7. response = requests.get(LAUNCHER_MANIFSET_URL)
  8. return json.loads(response.content)
  9. except Exception as e:
  10. LogWarning(f'获取版本列表失败:{e.with_traceback()}')
  11. return {}