python aternos
v2.0.1
Pythonで書かれた非公式のAternos API。
AternosのプライベートAPIとHTML解析を使用します。
警告
このライブラリはもはや維持されていません。
AJAX_TOKENのJSコードを介して、すべての自動化された要求(したがって、TOS違反)の検出を開始しました。詳細については、#85を参照してください。ごめんなさい。 Python-aternosの開発を続けたい場合は、私に連絡してください。しかし、ゼロから書く方が良いと思います。
Python Anternosはサポートしています:
ATERNOS_SESSION cookie値で説明するためにログインする$ pip install python-aternosWindowsユーザー向けのメモ
問題がある場合は、ここから
lxmlパッケージをインストールしてから実行します。
pip install --no-deps python-aternos
$ git clone https://github.com/DarkCat09/python-aternos.git
$ cd python-aternos
$ pip install -e .[dev]PythonスクリプトでAternos APIを使用するには、ユーザー名とパスワード、またはMD5ハッシュでログインします。
次に、 list_servers()を使用してサーバーリストをリクエストします。
Aternosサーバーを起動/停止し、 start()またはstop()を呼び出すことができます。
これがAPIの使用方法の例です。
# Import
from python_aternos import Client
# Create object
atclient = Client ()
# Log in
# with username and password
atclient . login ( 'example' , 'test123' )
# ----OR----
# with username and MD5 hashed password
atclient . login_hashed ( 'example' , 'cc03e747a6afbbcbf8be7668acfebee5' )
# ----OR----
# with session cookie
atclient . login_with_session ( 'ATERNOS_SESSION cookie value' )
# Get AternosAccount object
aternos = atclient . account
# Get servers list
servs = aternos . list_servers ()
# Get the first server
myserv = servs [ 0 ]
# Start
myserv . start ()
# Stop
myserv . stop ()
# You can also find server by IP
testserv = None
for serv in servs :
if serv . address == 'test.aternos.org' :
testserv = serv
if testserv is not None :
# Prints the server software and its version
# (for example, "Vanilla 1.12.2")
print ( testserv . software , testserv . version )
# Starts server
testserv . start ()| バージョン | 説明 |
|---|---|
| v0.3 | Files APIを実装し、タイプ化を追加しました。 |
| v0.4 | 構成APIを実装し、いくつかのバグ修正。 |
| v0.5 | APIは、新しいAternosセキュリティメソッドに対応して更新されました。 LUSM554に感謝します。 |
| v0.6/v1.0.0 | コードリファクタリング、WebSockets API、およびセッションの保存により、自動化アクセスの検出を防ぎます。 |
| v1.0.x | バグフィックスがたくさん、バージョン化変更(semver)が変更されました。 |
| v1.1.x | ドキュメント、ユニットテスト、ピリント、バグフィックス、ATWSSの変更。 |
| v1.1.2/v2.0.0 | #25(CloudFlareバイパス)のソリューション、JSパーサーのバグフィックス。 |
| v2.0.x | ドキュメント、セッションの自動保存/復元、ファイルAPIの改善。 |
| v2.1.x | WebSockets API、atConnect(Cookie Reshing Fixを含む)の修正。 Captcha Solving Servicesのサポート(#52を表示)。 |
| v2.2.x | node.jsインタープリターサポート。 |
| v3.0.0 | 部分的に書き直されたAPI更新。 |
| v3.0.5 | 維持されていません。 |
| v3.1.x | TODO:Config APIの完全な実装。 |
| v3.2.x | TODO:Access APIの共有とGoogleドライブのバックアップ。 |
プライベートAternos APIリクエストはこのHARファイルにキャプチャされ、郵便配達員ワークスペースにインポートされました。
両方のリソースを使用して、APIを探索できます。
このライブラリの改善に関するヘルプは大歓迎です。
ライセンス通知:
Copyright 2021-2022 All contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.