Skip to main content

It is a library that allows you to interact with unofficial HDRezka API

Project description

Rezka API SDK

PyPI Version Python Version

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("http://hdrezka1tqbbd.org/films/action/47946-top-gan-meverik-2022.html")


# 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rezka_api_sdk-0.0.1.post8.tar.gz (4.6 kB view details)

Uploaded Source

File details

Details for the file rezka_api_sdk-0.0.1.post8.tar.gz.

File metadata

  • Download URL: rezka_api_sdk-0.0.1.post8.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for rezka_api_sdk-0.0.1.post8.tar.gz
Algorithm Hash digest
SHA256 6b8d643811f20b911ff3fb7b6c206d2c18d47b9e4c0599fc1c9990fb766f1d47
MD5 11c149298fad81d44002cd40024fc5da
BLAKE2b-256 0a80e1d15a53f7f0d003f9a252c3597f425d62dc2f5affe69c9e230ad9acf1e1

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