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.7.tar.gz (26.1 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.7-py3-none-any.whl (27.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: otoge_py-0.0.7.tar.gz
  • Upload date:
  • Size: 26.1 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.7.tar.gz
Algorithm Hash digest
SHA256 482fb52ab350c5a6d03b7cf90ff0e676a390840ebb23ba4b6f52aca5003f4709
MD5 148413cc02a5690b2ae9e1a9c92d4776
BLAKE2b-256 9a0460da79de0d1a5371899678745b230987395e139669239b53550aa863fa10

See more details on using hashes here.

File details

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

File metadata

  • Download URL: otoge.py-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 27.6 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 d1b9888b99cb95ac3b71bc28cf28e1b7d3582f6b4830b7389dd9548be6080eef
MD5 3f124eaca12dd567249a089193cef902
BLAKE2b-256 7897cdb249874e37c5d069f73375f2502789f2ef314b9b4d7c79ea110b8fecd3

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