{"id":16975595,"url":"https://github.com/superzombi/hdrezkaapi","last_synced_at":"2026-03-15T23:28:42.467Z","repository":{"id":57711909,"uuid":"440926983","full_name":"SuperZombi/HdRezkaApi","owner":"SuperZombi","description":"HDRezka Python API","archived":false,"fork":false,"pushed_at":"2025-03-02T17:58:03.000Z","size":95,"stargazers_count":92,"open_issues_count":0,"forks_count":12,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-28T16:07:47.153Z","etag":null,"topics":["anime","api","cartoon","films","hdrezka","movies","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/HdRezkaApi/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SuperZombi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://donatello.to/super_zombi"]}},"created_at":"2021-12-22T16:55:37.000Z","updated_at":"2025-03-27T15:58:01.000Z","dependencies_parsed_at":"2025-01-16T15:05:55.688Z","dependency_job_id":"a1b5b7e3-260a-483c-87ce-591aebc02ad1","html_url":"https://github.com/SuperZombi/HdRezkaApi","commit_stats":{"total_commits":55,"total_committers":2,"mean_commits":27.5,"dds":"0.036363636363636376","last_synced_commit":"ac417e7a1328e75e51a8583ddbca06e649a81386"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuperZombi%2FHdRezkaApi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuperZombi%2FHdRezkaApi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuperZombi%2FHdRezkaApi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuperZombi%2FHdRezkaApi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SuperZombi","download_url":"https://codeload.github.com/SuperZombi/HdRezkaApi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247217172,"owners_count":20903008,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anime","api","cartoon","films","hdrezka","movies","python"],"created_at":"2024-10-14T01:23:16.596Z","updated_at":"2026-02-22T14:01:37.778Z","avatar_url":"https://github.com/SuperZombi.png","language":"Python","funding_links":["https://donatello.to/super_zombi"],"categories":[],"sub_categories":[],"readme":"# HdRezkaApi\n\n\u003ca href=\"https://pypi.org/project/HdRezkaApi/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/HdRezkaApi\"\u003e\u003c/a\u003e\n\u003ca href=\"https://superzombi.github.io/HdRezkaApi/\"\u003e\u003cimg src=\"https://shields.io/badge/📖-Documentation-ffbc5c\"\u003e\u003c/a\u003e\n\u003ca href=\"#donate\"\u003e\u003cimg src=\"https://shields.io/badge/💲-Support_Project-2ea043\"\u003e\u003c/a\u003e\n\n## Install:\n```\npip install HdRezkaApi\n```\n\n## Table of Contents:\n1. [Usage](#usage)\n2. [Film Information](#film-information)\n3. [Translators priority](#translators-priority)\n4. [getStream](#getstream)\n5. [getSeasonStreams](#getseasonstreams)\n6. [HdRezkaStream](#hdrezkastream)\n7. [HdRezkaStreamSubtitles](#hdrezkastreamsubtitles)\n8. [HdRezkaRating](#hdrezkarating)\n9. [Proxy](#proxy)\n10. [Cookies](#cookies)\n11. [HdRezkaSearch](#hdrezkasearch)\n12. [HdRezkaSession](#hdrezkasession)\n\n\u003chr\u003e\n\n## Usage\n\n```python\nfrom HdRezkaApi import HdRezkaApi\nfrom HdRezkaApi.types import TVSeries, Movie\nfrom HdRezkaApi.types import Film, Series, Cartoon, Anime\n\nurl = \"https://hdrezka.ag/   __YOUR_URL__   .html\"\n\nrezka = HdRezkaApi(url)\nif not rezka.ok:\n\tprint(\"Error:\", str(rezka.exception))\n\traise rezka.exception\n\nprint(rezka.name)\nprint(rezka.thumbnail)\nprint( rezka.rating.value )\nprint( rezka.rating.votes )\nprint( rezka.translators )\nprint( rezka.otherParts )\nprint( rezka.seriesInfo )\n\nprint(rezka.type)\nprint(rezka.type == TVSeries == TVSeries() == \"tv_series\")\n\nprint(rezka.category)\nprint(rezka.category == Anime == Anime() == \"anime\")\n\nprint( rezka.getStream()('720p') ) # if movie\nprint( rezka.getStream('1', '1')('720p') )\nprint( dict(rezka.getSeasonStreams('1')) )\n```\n\n## Film Information\n\n| Attribute                        | Description                          |\n|----------------------------------|--------------------------------------|\n| \u003ca id=\"film-id\" href=\"#film-id\"\u003e`self.id`\u003c/a\u003e| Film ID                  |\n| \u003ca id=\"film-name\" href=\"#film-name\"\u003e`self.name`\u003c/a\u003e| Film name          |\n| \u003ca id=\"film-description\" href=\"#film-description\"\u003e`self.description`\u003c/a\u003e| Film description |\n| \u003ca id=\"film-type\" href=\"#film-type\"\u003e`self.type`\u003c/a\u003e| [`HdRezkaFormat`](#hdrezkaformat)|\n| \u003ca id=\"film-category\" href=\"#film-category\"\u003e`self.category`\u003c/a\u003e|[`HdRezkaCategory`](#hdrezkacategory)|\n| \u003ca id=\"film-thumbnail\" href=\"#film-thumbnail\"\u003e`self.thumbnail`\u003c/a\u003e      | Film thumbnail URL|\n| \u003ca id=\"film-thumbnailhq\" href=\"#film-thumbnailhq\"\u003e`self.thumbnailHQ`\u003c/a\u003e| Film thumbnail in high quality |\n| \u003ca id=\"film-rating\" href=\"#film-rating\"\u003e`self.rating`\u003c/a\u003e |[`HdRezkaRating`](#hdrezkarating) |\n| \u003ca id=\"film-otherparts\" href=\"#film-otherparts\"\u003e`self.otherParts`\u003c/a\u003e|Other parts of this film `[{Film_name: url}]`|\n| \u003ca id=\"film-translators\" href=\"#film-translators\"\u003e`self.translators`\u003c/a\u003e|[Translators dict by id](#translators)|\n| \u003ca id=\"film-translators-names\" href=\"#film-translators-names\"\u003e`self.translators_names`\u003c/a\u003e|[Translators dict by names](#translators_names)|\n| \u003ca id=\"film-seriesinfo\" href=\"#film-seriesinfo\"\u003e`self.seriesInfo`\u003c/a\u003e| [Series info](#seriesInfo) by translators|\n| \u003ca id=\"film-episodesinfo\" href=\"#film-episodesinfo\"\u003e`self.episodesInfo`\u003c/a\u003e|All [seasons and episodes](#episodesInfo)|\n\n#### `translators`\n```\n{\n\tTranslator_id: {\n\t\tname: Translator_name,\n\t\tpremium: bool\n\t}\n}\n```\n#### `translators_names`\n```\n{\n\tTranslator_name: {\n\t\tid: Translator_id,\n\t\tpremium: bool\n\t}\n}\n```\n\n#### `seriesInfo`\n```\n{\n\tTranslator_id: {\n\t\ttranslator_name,\n\t\tseasons: {1, 2},\n\t\tepisodes: {\n\t\t\t1: {1, 2, 3},\n\t\t\t2: {1, 2, 3}\n\t\t}\n\t}\n}\n```\n\n#### `episodesInfo`\n```\n[\n\t{\n\t\tseason: 1, season_text,\n\t\tepisodes: [\n\t\t\t{\n\t\t\t\tepisode: 1, episode_text,\n\t\t\t\ttranslations: [\n\t\t\t\t\t{translator_id, translator_name, premium}\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t}\n]\n```\n\n\u003chr\u003e\n\n### HdRezkaFormat\n\nParent of classes: `TVSeries` and `Movie`\n```python\nfrom HdRezkaApi.types import TVSeries, Movie\nrezka.type == TVSeries == TVSeries() == \"tv_series\"\n```\n\n### HdRezkaCategory\n\nParent of classes: `Film`, `Series`, `Cartoon`, `Anime`\n```python\nfrom HdRezkaApi.types import Film, Series, Cartoon, Anime\nrezka.category == Anime == Anime() == \"anime\"\n```\n\n\u003chr\u003e\n\n### Translators priority\n```python\nrezka = HdRezkaApi(url, translators_priority:list, translators_non_priority:list)\n# or\nrezka.translators_priority = new_value\nrezka.translators_non_priority = new_value\n```\n#### `translators_priority`\nPriority of translators IDs, where the further to the left, the more desirable the translation.\n\n#### `translators_non_priority`\nPriority of unwanted translator identifiers, where the further to the right, the less desirable the translation.\n\n### sort_translators\n```python\nsort_translators(\n\ttranslators=self.translators,\n\tpriority=self.translators_priority,\n\tnon_priority=self.translators_non_priority\n)\n```\n\n\u003chr\u003e\n\n### getStream\n```python\ngetStream(season, episode, translation=None, priority=None, non_priority=None)\n```\n```python\ngetStream(\n\ttranslation='Дубляж' or translation='56'\n)\n```\nIf type is movie then there is no need to specify season and episode.\n```python\nstream = rezka.getStream() # if movie\n```\n#### [`priority` and `non_priority`](#translators-priority)\n\u003chr\u003e\n\n### getSeasonStreams\n```python\ngetSeasonStreams(season, translation=None, ignore=False, progress=None, priority=None, non_priority=None)\n```\n```python\ngetSeasonStreams(\n\ttranslation='Дубляж' or translation='56'\n)\n```\n\n#### [`priority` and `non_priority`](#translators-priority)\n#### `ignore` - ignore errors\n#### `progress` - callback function\n\n```python\ndef progress(current, all):\n\tpercent = round(current * 100 / all)\n\tprint(f\"{percent}%: {current}/{all}\", end=\"\\r\")\n\nprint( dict(rezka.getSeasonStreams(1, ignore=True, progress=progress)) )\n```\n\nOutput example:\n```\n{'1': \u003cHdRezkaStream(season:1, episode:1)\u003e, '2': \u003cHdRezkaStream(season:1, episode:2)\u003e, ...}\n```\n\nIf an error occurs, an attempt will be made to repeat the request again.\u003cbr\u003e\nBut if the error occurs again, then `None` will be added to the final dict.\u003cbr\u003e\nTo ignore errors and retry requests until a response is received, specify the `ignore=True` option.\n\n```python\nfor i, stream in rezka.getSeasonStreams('1'):\n\tprint(stream)\n```\n\n\u003chr\u003e\n\n# HdRezkaStream\n\n| Attribute              | Description                                             |\n|------------------------|---------------------------------------------------------|\n|\u003ca id=\"stream-videos\" href=\"#stream-videos\"\u003e`self.videos`\u003c/a\u003e|Dict of videos where the key is resolution and value is list of URLs|\n|\u003ca id=\"stream-name\" href=\"#stream-name\"\u003e`self.name`\u003c/a\u003e| Film name                |\n|\u003ca id=\"stream-translatorid\" href=\"#stream-translatorid\"\u003e`self.translator_id`\u003c/a\u003e  | Translator ID |\n|\u003ca id=\"stream-season\" href=\"#stream-season\"\u003e`self.season`\u003c/a\u003e | Season number (`None` if film)    |\n|\u003ca id=\"stream-episode\" href=\"#stream-episode\"\u003e`self.episode`\u003c/a\u003e| Episode number (`None` if film) |\n|\u003ca id=\"stream-subtitles\" href=\"#stream-subtitles\"\u003e`self.subtitles`\u003c/a\u003e| [HdRezkaStreamSubtitles](#hdrezkastreamsubtitles) object|\n|\u003ca id=\"stream-call\" href=\"#stream-call\"\u003e`HdRezkaStream(resolution)`\u003c/a\u003e|Call object with argument to get the URL of the video|\n\n### Usage examples:\n\n```python\nstream = rezka.getStream(1, 5)\n\nprint( stream('720p') )\nprint( stream('720') )\nprint( stream(1080) )\nprint( stream('Ultra') )\nprint( stream('1080p Ultra') )\nprint( stream.videos )\n```\n```\n{\n\t'360p': ['https://sambray.org/...mp4', 'https://stream.voidboost.cc/...mp4'],\n\t'480p': ['https://sambray.org/...mp4', 'https://stream.voidboost.cc/...mp4'],\n\t'720p': ['https://sambray.org/...mp4', 'https://stream.voidboost.cc/...mp4'],\n}\n```\n\n\n# HdRezkaStreamSubtitles\n| Attribute              | Description                   |\n|------------------------|-------------------------------|\n|\u003ca id=\"subtitles\" href=\"#subtitles\"\u003e`self.subtitles`\u003c/a\u003e|Dict of subtitles where the key is the language code and value is the subtitle information|\n| \u003ca id=\"subtitles-keys\" href=\"#subtitles-keys\"\u003e`self.keys`\u003c/a\u003e|List of available subtitle language codes|\n| \u003ca id=\"subtitles-call\" href=\"#subtitles-call\"\u003e`self(id)`\u003c/a\u003e |Call object with argument to get URL of subtitles|\n\n### Usage examples:\n\n```python\nstream = rezka.getStream(1, 5)\n\nprint( stream.subtitles.subtitles )  # { 'en': {'title': 'English', 'link': 'https:/'}, ...  }\nprint( stream.subtitles.keys )       # ['en', 'ru']\nprint( stream.subtitles('en') )      # 'https:/'\nprint( stream.subtitles('English') ) # 'https:/'\nprint( stream.subtitles(0) )         # 'https:/'\n#                       ^ index\n```\n\n\n# HdRezkaRating\n| Attribute                         | Description                                      |\n|-----------------------------------|--------------------------------------------------|\n| \u003ca id=\"rating-value\" href=\"#rating-value\"\u003e`self.value`\u003c/a\u003e | Rating value (`float`)  |\n| \u003ca id=\"rating-votes\" href=\"#rating-votes\"\u003e`self.votes`\u003c/a\u003e | Number of votes (`int`) |\n\n\u003chr\u003e\n\n# Proxy\n```python\nrezka = HdRezkaApi(url, proxy={'http': 'http://192.168.0.1:80'})\n```\n\n# Cookies\n```python\nrezka = HdRezkaApi(url, cookies={\"dle_user_id\": user_id, \"dle_password\": password_hash})\n```\nIf you are not sure:\n```python\nrezka = HdRezkaApi(url, cookies=HdRezkaApi.make_cookies(user_id, password_hash))\n```\nManually login:\n```python\nrezka = HdRezkaApi(url)\nrezka.login(\"your_email@gmail.com\", \"your_password1234\")\n```\n\u003chr\u003e\n\n# HdRezkaSearch\n`HdRezkaSearch(origin, proxy, headers, cookies)(query, find_all=False)`\n### Fast search\n```python\nfrom HdRezkaApi.search import HdRezkaSearch\nresults = HdRezkaSearch(\"https://hdrezka.ag/\")(\"film name\")\n```\n```\n[\n\t{\n\t\t'title': 'Film name',\n\t\t'url': 'https://hdrezka.ag/__FILM_URL.html',\n\t\t'rating': 7.8\n\t}\n]\n```\n### Advanced search\n```python\nfrom HdRezkaApi.search import HdRezkaSearch\nresults = HdRezkaSearch(\"https://hdrezka.ag/\", cookies)(\"film name\", find_all=True)\nfor page in results:\n\tfor result in page:\n\t\tprint(result)\n```\n```\n{\n\t'title': 'Film name',\n\t'url': 'https://hdrezka.ag/__FILM_URL.html',\n\t'image': 'https://hdrezka.ag/image.jpg',\n\t'category': HdRezkaCategory()\n}\n```\n\n#### HdRezkaCategory\n\n`Series`, `Film`, `Cartoon`, `Anime`.\n\n#### All pages\n```python\nprint(results.all_pages)\n```\n```\n[\n\t[ {'title', 'url', 'image', 'category'}, ...],\n\t[ {'title', 'url', 'image', 'category'}, ...],\n\t...\n]\n```\n#### Flatten results\n```python\nprint(results.all)\n```\n```\n[\n\t{'title', 'url', 'image', 'category'},\n\t{'title', 'url', 'image', 'category'},\n\t...\n]\n```\n#### Specific page\n```python\nprint(results.get_page(2)) # page number\n# or\nprint(results[1]) # index\n```\n\n[Searching with session](#searching-with-session)\n\u003chr\u003e\n\n\n# HdRezkaSession\nHdRezkaSession allows you to log in once and not send login requests every time.\n\nYou can also specify origin to make requests to a same site. Origin in full urls will be ignored.\u003cbr\u003e\nIn the next example, the request will be made to the url: `\"https://rezka_mirror.com/__YOUR_URL__.html\"`\n```python\nfrom HdRezkaApi import HdRezkaSession\n```\n```python\nwith HdRezkaSession(\"https://rezka_mirror.com/\") as session:\n\tsession.login(\"email@gmail.com\", \"password\")\n\trezka = session.get(\"https://hdrezka.ag/__URL_PATH__.html\")\n```\nAlso when specifying origin you can specify only url path.\n```python\nwith HdRezkaSession(\"https://rezka_mirror.com/\") as session:\n\trezka = session.get(\"__URL_PATH__.html\")\n```\n\u003cbr\u003e\n\nYou can also not specify origin and then requests will be made to the URL you specified.\u003cbr\u003e\nBut then you won't be able to use login().\n```python\nwith HdRezkaSession() as session:\n\trezka = session.get(\"https://hdrezka.ag/__URL_PATH__.html\")\n```\n```python\nwith HdRezkaSession(cookies=cookies, headers=headers, proxy=proxy) as session:\n\t# or inline seting up\n\tsession.cookies = cookies\n\tsession.headers = headers\n\tsession.proxy = proxy\n```\n#### [`translators_priority`](#translators-priority)\n```python\nwith HdRezkaSession(translators_priority, translators_non_priority) as session:\n\t# or inline seting up\n\tsession.translators_priority = new_value\n\tsession.translators_non_priority = new_value\n```\n\n### Searching with session\n#### Fast search\n```python\nwith HdRezkaSession(\"https://rezka_mirror.com/\") as session:\n\tresults = session.search(\"film name\")\n```\n#### Advanced search\n```python\nwith HdRezkaSession(\"https://rezka_mirror.com/\") as session:\n\tsession.login(\"email@gmail.com\", \"password\")\n\tresults = session.search(\"film name\", find_all=True)\n\tfor page in results:\n\t\tfor result in page:\n\t\t\tprint(result)\n```\n[More info](#hdrezkasearch)\n\n\u003chr\u003e\n\n## 💲Donate\n\n\u003ctable\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003cimg width=\"18px\" src=\"https://www.google.com/s2/favicons?domain=https://donatello.to\u0026sz=256\"\u003e\n\t\t\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ca href=\"https://donatello.to/super_zombi\"\u003eDonatello\u003c/a\u003e\n\t\t\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003e\n\t\t\u003cimg width=\"18px\" src=\"https://www.google.com/s2/favicons?domain=https://www.donationalerts.com\u0026sz=256\"\u003e\n\t\t\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\u003ca href=\"https://www.donationalerts.com/r/super_zombi\"\u003eDonation Alerts\u003c/a\u003e\n\t\t\u003c/td\u003e\n\t\u003c/tr\u003e\n\u003c/table\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperzombi%2Fhdrezkaapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuperzombi%2Fhdrezkaapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperzombi%2Fhdrezkaapi/lists"}