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

Uploaded Python 3

File details

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

File metadata

  • Download URL: otoge_py-0.0.3.tar.gz
  • Upload date:
  • Size: 25.8 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.3.tar.gz
Algorithm Hash digest
SHA256 8e5f5e4d97adef71e03013b336745a530d4660b1cd3671c19d3faf537a0382e3
MD5 b271d88139938eeee20fe61e6ee243f5
BLAKE2b-256 0a5450df02e8d5f6373bb2d53b74337eef2218bb959e2bf8bbbb4673dfdf7de2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: otoge.py-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 27.4 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 39623d4b6db00316c37d104eeb44ed4529d25cae381faa170e89efec89747edb
MD5 227008a29072ede766a6fc3e3ac451ba
BLAKE2b-256 e399f58a103de6349ffa76a42dcad4a48150fd7eb36d0123f4b30ed5ebf657a6

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