Advertisement
dsonbill

Tiny Serverlist

Sep 27th, 2014
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. import urllib.request
  2. import json
  3.  
  4. server_list = { '64.251.27.43':'8081' }
  5.  
  6. for url in server_list:
  7.     x = json.loads(urllib.request.urlopen('http://{}:{}'.format(url, server_list[url])).readline().decode('utf-8'))
  8.     print('Name: {}  Mode: {}  Players: {}/{}  URL/IP:{}  Port: {}  ModControl:  {}'.format(x['server_name'], x['warp_mode'], x['player_count'], x['max_players'], url, x['port'], x['mod_control']))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement