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.8.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.8-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: otoge_py-0.0.8.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.8.tar.gz
Algorithm Hash digest
SHA256 18a164c5fa67ddcbcc0c4cf52ccbf86e05e44987e133a771383b7d3de7098456
MD5 42788f49f51749ae00aa7518304072cd
BLAKE2b-256 b05fc78106fddc90987e2d2c5bfb3ed84850d7b4173886628d3bbb1fd67c73b5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: otoge.py-0.0.8-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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 28dd22bb5abe2d1b5b32c7eed00cd6cad70f2134e7673f77dc66440ec19ea6bd
MD5 423b4970890e6caa1b1fa7012ff9cd45
BLAKE2b-256 942527d3139a184b9eca787fd0f6faf0e9cfe50e5dd8ccc642df62e1433816fe

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