Skip to main content

You can get and change the play history of GekiChuMai (CHUNITHM, ONGEKI, maimai), BEMANI (pop'n music, beatmania, SOUND VORTEX) and many more.

Project description

otoge.py

ゲキチュウマイ(パスワードでログイン可)、BEMANI(クッキーログインのみ)のプレイ履歴やその他諸々を取得・変更する Python ライブラリ。非同期操作(asyncio)のみをサポートしています。

[!Warning] このライブラリを使用して起きた損害についてライブラリ作成者のnennneko5787は一切責任を負いません。

現在サポート中のゲーム

ゲキチュウマイ (SEGA)

  • CHUNITHM
  • maimai
    • プロフィール閲覧
    • プレイ履歴閲覧
    • ユーザーネーム変更
  • オンゲキ

BEMANI (KONAMI)

  • pop'n music
    • プロフィール閲覧
    • プレイ履歴閲覧
  • beatmania
  • SOUND VORTEX

お願い

私は音ゲーに疎いので追加してほしい値・機能などありましたら イシュー(issues) または プルリクエスト(Pull request) を投げていただけるとありがたいです。

How to install

必要なもの

  • Python 3.8 より上のバージョン
多くの場合、以下のライブラリはインストール時に構成されます。
  • httpx
  • beautifulsoup4
  • selenium
  • tls-client
# development builds
pip install git+https://github.com/nennneko5787/otoge.py
# release builds
pip install otoge.py

maimai

サンプルコード

import asyncio

from otoge import MaiMaiClient

maimai = MaiMaiClient()


async def main():
    cards = await maimai.login("<SEGA ID>", "<PASSWORD>")
    card = cards[0] # カードは配列になっているので、カードが1枚しかない場合はインデックスでログイン、カードが2枚以上ある場合はforループを回してカードを探す
    await card.select()
    print(f"logined as {card.name}")
    records = await card.record()
    for record in records:
        print(
            f"{record.name} [{record.difficult} / {record.playedAt}]: {record.scoreRank} ({record.percentage})"
        )


asyncio.run(main())

pop'n music

Login With KONAMI ID

import asyncio

from otoge import POPNClient

popn = POPNClient(skipKonami=False)


async def main():
    await popn.loginWithID("<KONAMI ID>", "<PASSWORD>")
    code = input("Enter Code: ")
    await popn.enterCode(code)
    print(await popn.fetchProfile())


asyncio.run(main())

Login With Cookie

import asyncio
import json as JSON

from otoge import POPNClient

popn = POPNClient(skipKonami=True)


async def main():
    # popn.http.cookies または popn.konami.http.cookies で抽出できます
    with open("cookies.json") as f:
        data = f.read()
    cookies = json.loads(data)
    await popn.loginWithCookie(cookies)
    print(await popn.fetchProfile())


asyncio.run(main())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

otoge_py-0.0.9.tar.gz (26.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

otoge.py-0.0.9-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

Details for the file otoge_py-0.0.9.tar.gz.

File metadata

  • Download URL: otoge_py-0.0.9.tar.gz
  • Upload date:
  • Size: 26.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for otoge_py-0.0.9.tar.gz
Algorithm Hash digest
SHA256 9bcaf650f392c25a81d31149a81701c7b9b2fafaf7038efb52c542912975f427
MD5 e9eb0ec1b6120d7f3ccab319863bf1e7
BLAKE2b-256 5ba6566ee5a2365a2c9ea7c7d1fe27e7ac8e7fe3b03b741c6c38f7fa8c632af9

See more details on using hashes here.

File details

Details for the file otoge.py-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: otoge.py-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 27.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for otoge.py-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 bccd9e39ff03e6b1647977848ba4c36219f173104bbba4313055f6c316e97d85
MD5 cb89efa039a0e53c65160fe2008a1fb2
BLAKE2b-256 7185792e1b2d26b30aa48f6dbcccb91533641c297c14bbf6255c6e297ff7d4b7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page