Repository navigation
v4.0.1
4.0.1
Warning: If your code accesses post.Post.info.translator, it will break after this update.
Please update your code to use post.Post.info.translators and adjust any logic accordingly.
- Bug fixed:
translator: strreplaced withtranslators: tuple[str, ...]inpost.Post.info.
This field was previously interpreted as a single translator name, but it actually represents multiple translators in
a comma-separated string.
Now it's correctly parsed into a tuple of strings.
It is recommended to usepost.Post.translators(Translatorstype) instead.
4.0.0
Warning: This release contains backward incompatible changes. Please carefully review the list of changes before
updating.
-
Global Changes
- The internal logic for parsing content information has been reorganized to improve stability and support future
changes. - Added a new type
post.info.fields.Hyperlink(NamedTuplewith fieldsname: str,url: str), which is now
used in manyPostInfofields instead of simple strings or tuples of strings, providing both a name and a link.
- The internal logic for parsing content information has been reorganized to improve stability and support future
-
New Features
- Franchises:
- Added functionality to retrieve information about franchises (related content parts);
The fieldpost.Post.oter_parts_urlsused for these purposes earlier is removed. - Added the
franchisesfield (typeFranchiseInfo) to thePostclass, providing access to franchise data (
previous, next parts, list of all parts, franchise poster). - Added related types
FranchiseInfoandFranchiseEntryinpost.info.franchises.
- Added functionality to retrieve information about franchises (related content parts);
post.info.Person:- New
Persontype, reflecting information about an actor (name, photo, career, date and place of birth,
height).
- New
- Trailers:
- Added method
PlayerBase.get_trailer_iframe(self) -> str
andapi.AJAX.get_trailer_video(cls, id: SupportsInt | str)
- Added method
PostInfo:- Added
durationfield (typeint) – total duration in seconds, obtained from page metadata. - The
personsfield is now a tuple ofPersonobjects.
- Added
- Franchises:
-
Backward Incompatible Changes
api.http:- The
login_globalfunction now acceptsemailinstead ofnameas the first argument for login.
- The
post.info.fields:- Removed the
Durationtype. UsePostInfo.duration(seconds) orPostInfo.duration_m(minutes). - Removed the
Placetype. Use the newRanktype. - Added the
Ranktype (NamedTuplewith fieldsname: Hyperlink,rank: int), replacingPlacefor
representing positions in lists/rankings. Ratingtype:- The
servicefield is now of typeHyperlink(contains the name and URL of the rating service) instead
ofstr. - The
urlfield has been removed (the information is now contained inservice.url).
- The
- Removed the
post.info.PostInfo:- The
ratingfield has been renamed toratings. The value typedict[str, Rating]remains the same, but the
internal structure ofRatinghas changed (see above). - The
placesfield has been renamed torankingsand now returns a tuple ofRankobjects (
tuple[Rank]). - The
durationfield (previously of typeDuration) has been renamed toduration_mand now returns an
int(duration in minutes, as displayed in the table on the site). - The
duration_sfield has been removed. Use the newdurationfield (total duration in seconds). - The
from_field has been renamed tocollectionsand now returns a tuple ofHyperlinkobjects (
tuple[Hyperlink]). - The
charactersfield has been renamed topersonsand now returns a tuple ofHyperlinkobjects (
tuple[Hyperlink]). - The
countryfield now returns a tuple ofHyperlinkobjects (tuple[Hyperlink, ...]). - The
genrefield now returns a tuple ofHyperlinkobjects (tuple[Hyperlink, ...]). - Removed the
fieldsfield.
- The
post.Post:- Removed the
other_parts_urlsfield. Use the newfranchisesfield to get information about other parts.
- Removed the
api.AJAX:- All arguments
idare renamedid_.
- All arguments
- Some classes and functions that are no longer used are removed.
-
Improvements
post.urls.kind.video.VideoURL:- Asynchronous retrieval of video URL (
await video_url) has become more reliable: it now returns the original
URL if the server did not provide a redirect URL.
- Asynchronous retrieval of video URL (
- Type and bug fixes.
- Minor decomposition of code.
- Other minor improvements and optimizations.
Full Changelog: v3.3.1...v4.0.1