Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import hypixel
- import time
- import re
- choice = input('nicknames или log:pass? (1, 2): ')
- API_KEYS = ['2c06713d-a617-41a3-b598-e0c608e0d6da']
- hypixel.setKeys(API_KEYS)
- l = -1
- f = open('nicknames.txt', 'r')
- f1 = open('sorted.txt', 'w', encoding='utf-8')
- f2 = open('logdatabase.txt', 'r')
- lines = f.readlines()
- def login_treatment(login2):
- try:
- Player = hypixel.Player(login2)
- PlayerName = Player.getName()
- PlayerRank = Player.getRank()['rank']
- PlayerLevel = str(Player.getLevel()).split('.')[0]
- f1.write('=================')
- f1.write('\n')
- f1.write(f'nickname - {PlayerName}')
- f1.write('\n')
- f1.write(f'Rank - {PlayerRank}')
- f1.write('\n')
- f1.write(f'Level - {PlayerLevel}')
- f1.write('\n')
- f1.write('=================')
- except hypixel.PlayerNotFoundException:
- print('хуяк,акка нет в базе)')
- except hypixel.HypixelAPIError:
- print('Жду 30 сек и продолжаю)')
- time.sleep(30)
- print(choice)
- if choice == '1':
- for i in f:
- l += 1
- login_treatment(lines[l].replace('\n', ''))
- elif choice == '2':
- for j in f2:
- login = re.findall('^(.+?):', j)
- print(login)
- Player = hypixel.Player(login[0])
- login_treatment(login[0])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement