Skip to content

v5.0.0

Choose a tag to compare

@ndenissov ndenissov released this 25 Jul 08:02
· 12 commits to main since this release

5.0.0

Breaking: process-global session state is removed. Use one HDRezkaClient per user
(or per API request scope).

Added

  • HDRezkaClient — isolated async session (HTTP client, host, cookies, player cache).
  • Client factories: search, page, player, post, favorites; bound ajax.
  • Context manager support: async with HDRezkaClient() as client.
  • RequestKwargs remains in hdrezka.api.http as a typing helper.
  • DEFAULT_HOST / DEFAULT_REDIRECT_URL in hdrezka.url.
  • Site chrome parsers (hdrezka.post.site):
    • parse_navbar / await client.navbar() — top navigation map (genres, collections, find-best).
    • parse_page_filters / Page.get_filters — catalog filter= / genre= controls with active state.
    • parse_series_updates / await client.series_updates() — sidebar episode updates by date.
    • Page.get_page(..., filter=, genre=, **query) and get_page_content — query params + combined payload.
  • Favorites / collections (requires login):
    • AJAX / client helpers: add_favorites_cat, rename_favorites_cat, add_favorites_post,
      remove_favorites_cat (POST /ajax/favorites/).
    • Favorites page (client.favorites(cat_id)) for /favorites/[id] via the usual Page API.
    • FavoritesCat / parse_favorites_cats / get_cats — collection list (name, count, url, id).

Changed

  • Search, Page, Post, Player* require client=.
  • AJAX is instance-bound (client.ajax), no longer classmethods.
  • InlineItem includes a client field for await item.player.
  • Stream redirect resolve (await VideoURL) uses the same client session.
  • Person / FranchiseInfo fetch details through the client when awaited.
  • Player cache is per-client (CacheStorage), not a module singleton.
  • Request is a defaults namespace only (not shared mutable session host).

Removed

  • login_global
  • Module-level DEFAULT_CLIENT and DEFAULT_REQUEST_KWARGS
  • Module-level CACHE / get_response globals

Migration

# 4.x
await login_global(email, password)
player = await Player(url)

# 5.x
async with HDRezkaClient() as client:
    await client.login(email, password)
    player = await client.player(url)

Full Changelog: v4.0.4...v5.0.0