python aternos
v2.0.1
파이썬으로 쓰여진 비공식 Aternos API.
Aternos의 개인 API 및 HTML 구문 분석을 사용합니다.
경고
이 라이브러리는 더 이상 유지 관리되지 않습니다.
AJAX_TOKEN 의 JS 코드를 통해 JS2PY에서 잘못 실행되며 Nodejs DOM 라이브러리 (적어도) 또는 브라우저 엔진이 필요한 모든 자동 요청 (및 TOS 위반)을 감지하기 시작했습니다. 자세한 내용은 #85를 참조하십시오.정말 죄송합니다. Python-inaternos의 개발을 계속하려면 저에게 연락하십시오. 그러나 처음부터 글을 쓰는 것이 낫다고 생각합니다.
Python Aternos가 지원합니다.
ATERNOS_SESSION 쿠키 값으로 계정에 로그인$ 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]파이썬 스크립트에서 Aternos API를 사용하려면 IT를 가져 와서 사용자 이름과 비밀번호 또는 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 | 구현 된 파일 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 (쿠키 새로 고침 수정 포함). 보안 문자 해결 서비스 지원 (보기 #52). |
| v2.2.x | node.js 통역 지원. |
| v3.0.0 | 부분적으로 다시 작성, API 업데이트. |
| v3.0.5 | 인재되지 않았습니다. |
| v3.1.x | TODO : 구성 API의 전체 구현. |
| v3.2.x | TODO : 공유 액세스 API 및 Google 드라이브 백업. |
Private 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.