Вверх ↑
Ответов: 13
EZclan
лидер
#1: 2020-07-01 23:27:42 ЛС | профиль | цитата
AquaCore,
лови чекер дракона

[code]
import requests
import json
import time


header = {'referer':'https://forum.minecraft-galaxy.ru/forum/0','upgrade-insecure-requests':'1','user-agent': 'X'}
header['cookie'] = 'PHPSESSID=X'

url = 'http://map.minecraft-galaxy.ru/players/29?d=0'

x1,z1 = [-148, 227]
x2,z2 = [40, 109]


def get_html(url):
return requests.get(url, headers=header).text


def check_arena():
while True:
s = get_html(url).replace('id', '"id"').replace("'",'"')
players = json.loads(s)
for player in players:
if player['x']› x1 and player['x'] ‹ x2 and player['z'] ‹ z1 and player['z'] › z2:
print(player['name'])
print('-------')
time.sleep(1)


if __name__ == "__main__":
check_arena()

[/code]

карма: 0
0