Sphinx Documentation

This commit is contained in:
DarkCat09 2022-06-17 14:34:47 +04:00
parent 9f0610e5a7
commit c7390f4ec2
75 changed files with 38248 additions and 10 deletions

View file

@ -6,7 +6,7 @@ from cloudscraper import CloudScraper
from typing import Optional, Union
from . import atjsparse
from .aterrors import CredentialsError, CloudflareError
from .aterrors import TokenError, CloudflareError
REQUA = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.84 Safari/537.36 OPR/85.0.4341.47'
@ -62,7 +62,7 @@ class AternosConnect:
self.token = ctx.window['AJAX_TOKEN']
except (IndexError, TypeError):
raise CredentialsError(
raise TokenError(
'Unable to parse TOKEN from the page'
)

View file

@ -4,15 +4,15 @@ class AternosError(Exception):
class CloudflareError(AternosError):
"""Raises when the parser is unable to bypass Cloudflare protection"""
"""Raised when the parser is unable to bypass Cloudflare protection"""
class CredentialsError(AternosError):
"""Raises when a session cookie is empty which means incorrect credentials"""
"""Raised when a session cookie is empty which means incorrect credentials"""
class TokenError(AternosError):
"""Raises when the parser is unable to extract Aternos ajax token"""
"""Raised when the parser is unable to extract Aternos ajax token"""
class ServerError(AternosError):
@ -20,19 +20,20 @@ class ServerError(AternosError):
class ServerEulaError(ServerError):
"""Raises when trying to start without confirming Mojang EULA"""
"""Raised when trying to start without confirming Mojang EULA"""
class ServerRunningError(ServerError):
"""Raises when trying to start already running server"""
"""Raised when trying to start already running server"""
class ServerSoftwareError(ServerError):
"""Raises when Aternos notifies about incorrect software version"""
"""Raised when Aternos notifies about incorrect software version"""
class ServerStorageError(ServerError):
"""Raises when Aternos notifies about violation of storage limits (4 GB for now)"""
"""Raised when Aternos notifies about violation of storage limits (4 GB for now)"""
class FileError(AternosError):
pass
"""Raised when trying to execute a disallowed by Aternos file operation"""