Closed P4R1H closed 2 years ago
Here's the part of the code that logs in to aternos
from python_aternos import Client
intents = discord.Intents.all()
client = commands.Bot(command_prefix='>', intents=intents)
# Log in
try:
atern = Client.from_credentials(f'{os.getenv("username")}', f'{os.getenv("password")}')
except Exception as a:
print(a)
servs = atern.list_servers()
Hello. Thank you for opening the issue.
Your problem is the same as #17
python-aternos can't bypass the Cloudflare protection, and repeats the function call many times (view this code, it's a recursion).
I'm already working on it.
I've forgot to decrease the retries number...
Здравствуйте! Проблема будет решена на уровне API я верно понял?)
I hope / Надеюсь.
thanks for the quick reply
not facing recursion error anymore but the same one as zeyn now
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/python_aternos/atconnect.py", line 33, in parse_token
token_func = js_code[1] if len(js_code) > 1 else js_code[0]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 13, in <module>
atern = Client.from_credentials(f'{os.getenv("username")}', f'{os.getenv("password")}')
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/python_aternos/__init__.py", line 47, in from_credentials
return cls.from_hashed(username, md5)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/python_aternos/__init__.py", line 23, in from_hashed
atconn.parse_token()
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/python_aternos/atconnect.py", line 39, in parse_token
raise CredentialsError(
python_aternos.aterrors.CredentialsError: Unable to parse TOKEN from the page
@Sept1-c, are you still getting the CredentialsError?
Send me the token function:
<head>
, click on the arrow to expand<script type=text/javascript>
which must contain something like https://github.com/DarkCat09/python-aternos/blob/main/token.txtPlease, update the module, I fixed it. JavaScript parser works properly now.
updated, still seem to get the same error
also couldn't find anything like the link you sent in any of the <script type=text/javascript>
Update it to 1.0.3
.
Update it to
1.0.3
.
This did nothing for me. Here is what is included in the Githubissues.
entire traceback