It is a library that allows you to interact with unofficial HDRezka API
Project description
Rezka API SDK
SDK for unofficial Rezka API. Details about API at Telegram.
Installation
You can install rezka_api_sdk
using pip:
pip install rezka_api_sdk
Usage
from rezka_api_sdk import RezkaAPI, models
# Init API client
rezka_api = RezkaAPI("<your API key>")
# Get me, returns `models.UserModel`
await rezka_api.get_me()
# Search items, returns `list[SearchResultModel]`
await rezka_api.search("Top Gun: Maverick")
# Get short info about item and available translators, returns `tuple[ShortInfoModel, list[TranslatorInfoModel]]`
await rezka_api.get_info_and_translators("Top Gun: Maverick")
# Get direct urls
# NOTE: allowed to pass item's ID or URL
# Acceptable key arguments:
#
# translator_id: int; required;
# is_film: bool; required;
# translator_additional_arguments: dict; required; you can get it from `models.TranslatorInfoModel.additional_arguments`
# For films:
await rezka_api.get_direct_urls(
id = 47946,
translator_id = 56,
is_film = True,
translator_additional_arguments = {}
)
# For series:
await rezka_api.get_direct_urls(
id = 646, # Breaking bad
translator_id = 56,
is_film = False,
translator_additional_arguments = {},
season_id = "1",
episode_id = "1"
)
For user-friendly cli see cli.py.
Stay updated
For the latest news and updates, follow my Telegram Channel.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for rezka_api_sdk-0.0.1.post5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce6d8aef101d4233ca79d272ca36fff82e7862a23bd0f878ad9f080b8cb02aba |
|
MD5 | 4f910d77bf6b0a087590c472869b3459 |
|
BLAKE2b-256 | 311f0fc937c87fe79e3867099084a60b80ebe75c13b3fd3ee45405b4f8d429a5 |