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
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")
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.1.tar.gz
(3.5 kB
view details)
Built Distribution
File details
Details for the file hsr_pic_parcer-1.0.1.tar.gz
.
File metadata
- Download URL: hsr_pic_parcer-1.0.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b4b91e1433d9c647519a63ccbfd3ed80b389f366bfacaaeb9a9d607b94a6ac9 |
|
MD5 | 0f01ff3bfbedc51e96622d882d716a78 |
|
BLAKE2b-256 | 6f177c3a4f3ce8917cb5ea0c3026374f2a74a6e23bccf8f2c5cafbef40ce6cfd |
File details
Details for the file hsr_pic_parcer-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: hsr_pic_parcer-1.0.1-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbfb56ba335de7d840bd5fb352b4048de5264efb77bcf62c8343336ddee07d05 |
|
MD5 | 6338f8f290e0c14b5b9cdfab5ed1f269 |
|
BLAKE2b-256 | 2b8dd7d31799646456360768de4b97609f6a63a30be3f9962294b6d2ad1464ea |