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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file tensoul-0.1.7.tar.gz.

File metadata

  • Download URL: tensoul-0.1.7.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.10.2 Windows/10

File hashes

Hashes for tensoul-0.1.7.tar.gz
Algorithm Hash digest
SHA256 8016c7176646ab010f766f276748083fc034829f73898a9fec30d22a7d43c030
MD5 e14ca0e6a7fae2a9a674a950bb4de7c2
BLAKE2b-256 4fa47c140ca02aa3fa6f3201b14cab0bbf5b23d0ad9390a49d55607565d6d6f5

See more details on using hashes here.

File details

Details for the file tensoul-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: tensoul-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 23.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.10.2 Windows/10

File hashes

Hashes for tensoul-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 9389d00da35bb8daaad9e54381fcc9ad1990a4b73c6a40ebe72f2838e852388f
MD5 9a6007281d44401ca3828330eaf4b083
BLAKE2b-256 1226b1e646d9c2f8afe07352e3017f8851f44355b89bee8a855533aa1e3dc8fe

See more details on using hashes here.

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