Skip to main content

parser to get images from hsr mana

Project description

hsr_pic_parser

Introduction

This is a Python library for getting pictures of characters, light cones, relics and planetaries with names from starrail.mana.

Installation

pip install hsr-pic-parcer

Available functionality

get_char_pic(name) # returns binary picture of the character and full name of the character
get_char_icon_pic(name) # returns binary icon picture of the character and full name of the character
get_cone_pic(number) # returns binary picture of the light cone and full name of the light cone
get_cone_icon_pic(number) # returns binary icon picture of the light cone and full name of the light cone
get_relic_icon_pic(number) # returns binary icon picture of the relic or planetary and full name of the relic or planetary
get_character_prydwen(name) # returns binary picture of the character from prydwen

Examples

You can get picture of character using the following code:

from hsr_pic_parser import get_char_pic

picture, name = get_char_pic('argenti')

The name of the character should be identical to the one used on starrail.mana.

You can get picture and the name of the light cone:

from hsr_pic_parser import get_cone_pic

picture, name = get_cone_pic(20000)

The code of the light cone should be equivalent to the one used on starrail.mana.

from hsr_pic_parser import get_relic_icon_pic

picture, name = get_relic_icon_pic(101)

def save_image_as_png(image_data, output_file_path):
    with open(output_file_path, "wb") as png_file:
        png_file.write(image_data)

save_image_as_png(picture, f"${name}.png")

You can get the name and the picture of the charater from prydwen prydwen.gg by URL.

from hsr_pic_parser import get_character_prydwen

picture, name = get_character_prydwen('argenti')

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

hsr_pic_parcer-1.0.3.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

hsr_pic_parcer-1.0.3-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file hsr_pic_parcer-1.0.3.tar.gz.

File metadata

  • Download URL: hsr_pic_parcer-1.0.3.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for hsr_pic_parcer-1.0.3.tar.gz
Algorithm Hash digest
SHA256 0509379610540df89df081c20f80f02456015f24c7a91ead82de8dd39c0b3c67
MD5 49017889e70b5c9a7a8b51927cf83b26
BLAKE2b-256 b13d4b1fcad197260483e2042b69d5967eba637777b1464846c836646281fc36

See more details on using hashes here.

File details

Details for the file hsr_pic_parcer-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for hsr_pic_parcer-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 aa78dd63512572586ee6512b1362fcff1ed5e435f8bd9819e1ef017ac071760a
MD5 557401802bd6905dd51daed6092198d4
BLAKE2b-256 ee4899a291d2c7df10b0dc3d08764628be653983ff4370577c7c3ff5b23ba198

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