Skip to main content

No project description provided

Project description

tensoul-py

Convert MahjongSoul log into tenhou.net/6 format. (Inspired by https://github.com/Equim-chan/tensoul)

Usage

You need to have an account from CN server, because only accounts from CN server has the ability to login with username and password.

import json
import sys

from tensoul import MajsoulPaipuDownloader


username = "foo@bar.com"
password = "foobar"
record_uuid = "123456-abcdefgh-1234-abcd-1234-12345678abcd"  # taken from majsoul log link: https://game.maj-soul.com/1/?paipu=<this_part>_a12345678

downloader = MajsoulPaipuDownloader()
await downloader.start(username, password)
try:
    logs = await downloader.download(record_uuid)
    json.dump(logs, sys.stdout, ensure_ascii=False)
finally:
    await downloader.close()

See example.py also

Thanks

https://github.com/MahjongRepository/mahjong_soul_api

https://repo.riichi.moe/library.html#resources-majplus

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

tensoul-0.1.7.tar.gz (21.8 kB view hashes)

Uploaded Source

Built Distribution

tensoul-0.1.7-py3-none-any.whl (23.4 kB view hashes)

Uploaded Python 3

Supported by

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