Finally fixed 400 by updating URLs, improved logging
This commit is contained in:
parent
8ae655a34e
commit
4baf4ea1a7
17 changed files with 174 additions and 267 deletions
|
@ -1,7 +1,5 @@
|
|||
from getpass import getpass
|
||||
from typing import Optional
|
||||
from python_aternos import Client
|
||||
from python_aternos.atfile import AternosFile
|
||||
|
||||
user = input('Username: ')
|
||||
pswd = getpass('Password: ')
|
||||
|
|
|
@ -11,7 +11,10 @@ atclient.login(user, pswd)
|
|||
srvs = aternos.list_servers()
|
||||
|
||||
for srv in srvs:
|
||||
print('***', srv.domain, '***')
|
||||
print()
|
||||
print('***', srv.servid, '***')
|
||||
srv.fetch()
|
||||
print(srv.domain)
|
||||
print(srv.motd)
|
||||
print('*** Status:', srv.status)
|
||||
print('*** Full address:', srv.address)
|
||||
|
@ -20,3 +23,5 @@ for srv in srvs:
|
|||
print('*** Minecraft:', srv.software, srv.version)
|
||||
print('*** IsBedrock:', srv.edition == atserver.Edition.bedrock)
|
||||
print('*** IsJava:', srv.edition == atserver.Edition.java)
|
||||
|
||||
print()
|
||||
|
|
|
@ -1,23 +1,25 @@
|
|||
import asyncio
|
||||
import logging
|
||||
from getpass import getpass
|
||||
|
||||
from typing import Tuple, Dict, Any
|
||||
|
||||
from python_aternos import Client, Streams
|
||||
|
||||
|
||||
# Request credentials
|
||||
user = input('Username: ')
|
||||
pswd = getpass('Password: ')
|
||||
|
||||
# Debug logging
|
||||
logs = input('Show detailed logs? (y/n) ').strip().lower() == 'y'
|
||||
if logs:
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
|
||||
# Authentication
|
||||
# Instantiate Client
|
||||
atclient = Client()
|
||||
aternos = atclient.account
|
||||
|
||||
# Enable debug logging
|
||||
logs = input('Show detailed logs? (y/n) ').strip().lower() == 'y'
|
||||
if logs:
|
||||
atclient.debug = True
|
||||
|
||||
# Authenticate
|
||||
atclient.login(user, pswd)
|
||||
|
||||
server = aternos.list_servers()[0]
|
||||
|
|
|
@ -1,23 +1,25 @@
|
|||
import asyncio
|
||||
import logging
|
||||
from getpass import getpass
|
||||
|
||||
from typing import Tuple, Dict, Any
|
||||
|
||||
from python_aternos import Client, Streams
|
||||
|
||||
|
||||
# Request credentials
|
||||
user = input('Username: ')
|
||||
pswd = getpass('Password: ')
|
||||
|
||||
# Debug logging
|
||||
logs = input('Show detailed logs? (y/n) ').strip().lower() == 'y'
|
||||
if logs:
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
|
||||
# Authentication
|
||||
# Instantiate Client
|
||||
atclient = Client()
|
||||
aternos = atclient.account
|
||||
|
||||
# Enable debug logging
|
||||
logs = input('Show detailed logs? (y/n) ').strip().lower() == 'y'
|
||||
if logs:
|
||||
atclient.debug = True
|
||||
|
||||
# Authenticate
|
||||
atclient.login(user, pswd)
|
||||
|
||||
server = aternos.list_servers()[0]
|
||||
|
|
Reference in a new issue