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

Uploaded Python 3

File details

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

File metadata

  • Download URL: otoge_py-0.0.4.tar.gz
  • Upload date:
  • Size: 25.9 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.4.tar.gz
Algorithm Hash digest
SHA256 7365e9e1ac2b941deabfd5ba964bc6e81d41aff2a19794cc39bd20c3f226c14a
MD5 a2a434948aa001d758db143a8aebf4ee
BLAKE2b-256 46e055572b7a381fc757229b6a3e3425803cecfb598541fe37206edd43488685

See more details on using hashes here.

File details

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

File metadata

  • Download URL: otoge.py-0.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fac4ad98b326c2cfba6381674470aebd02648b64875d51181f4b7cb88a0b9b77
MD5 87d591ce84cd4d7c3bed2814a77948af
BLAKE2b-256 8455a1eefda594079afdff0d222c1af15776081095b5b33bf3da93ffd9c61ac7

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