Skip to content
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,7 @@

## v0.9.0
- Move aws waf module to external package
- Now imdbinfo-aws package is responsible for handling AWS WAF challenges, including cookie generation and management. This separation allows for better modularity and maintainability of the codebase, while still providing the necessary functionality to bypass AWS WAF protections when making requests to IMDb. The main imdbinfo package will now utilize the imdbinfo-aws package for any interactions that require handling AWS WAF challenges, ensuring a cleaner and more focused implementation.
- Now imdbinfo-aws package is responsible for handling AWS WAF challenges, including cookie generation and management. This separation allows for better modularity and maintainability of the codebase, while still providing the necessary functionality to bypass AWS WAF protections when making requests to IMDb. The main imdbinfo package will now utilize the imdbinfo-aws package for any interactions that require handling AWS WAF challenges, ensuring a cleaner and more focused implementation.

## v0.9.1
- Added `season_number` and `episode_number` as optional integer fields to the `BulkedEpisode` model to explicitly represent episode positioning within a series.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
- 🛡️ **Parental guide** including content advisories via `get_parental_guide`
- 📝 **Typed Pydantic models** for predictable responses
- ⚡ **Built-in caching** for faster repeated requests
- 🛡️ AWS WAF solver in CPython for better performance
- 🛡️**AWS WAF** solver in CPython for better performance
- ✅ **No API keys required**

## Installation
Expand Down Expand Up @@ -337,6 +337,16 @@ If you find this project useful, please consider giving it a ⭐ on GitHub!

Please read our [Contributing Guidelines](CONTRIBUTING.md) and [Code of Conduct](CODE_OF_CONDUCT.md) before contributing.

## Star History

<a href="https://www.star-history.com/?repos=tveronesi%2Fimdbinfo&type=date&legend=top-left">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=tveronesi/imdbinfo&type=date&theme=dark&logscale&legend=top-left" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=tveronesi/imdbinfo&type=date&logscale&legend=top-left" />
<img alt="Star History Chart" src="https://api.star-history.com/chart?repos=tveronesi/imdbinfo&type=date&logscale&legend=top-left" />
</picture>
</a>

## License

imdbinfo is released under the MIT License.
Expand Down
6 changes: 5 additions & 1 deletion imdbinfo/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,8 @@ class BulkedEpisode(BaseModel):
id: str # id without 'tt' prefix, e.g. '1234567'
imdbId: str
imdb_id: str
season_number: Optional[int] = None
episode_number: Optional[int] = None
title: str
plot: str
image_url: Optional[str] = None
Expand All @@ -516,6 +518,8 @@ def from_bulked_episode_data(cls, data: dict) -> "BulkedEpisode":
id=data["titleId"].replace("tt", ""),
imdbId=data["titleId"],
imdb_id=data["titleId"].replace("tt", ""),
season_number=data.get("series", {}).get("seasonNumber", None),
episode_number=data.get("series", {}).get("episodeNumber", None),
title=data["titleText"],
genres=data.get("genres") or [],
plot=data.get("plot", ""),
Expand All @@ -529,7 +533,7 @@ def from_bulked_episode_data(cls, data: dict) -> "BulkedEpisode":
)

def __str__(self):
return f"{self.title} ({self.release_date or 'N/A'}) - {self.imdbId} ({self.kind or 'N/A'})"
return f"{self.title} S{str(self.season_number).zfill(2)}-E{str(self.episode_number).zfill(2)}({self.release_date or 'N/A'}) - {self.imdbId} ({self.kind or 'N/A'})"


class SeasonEpisodesList(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "imdbinfo"
version = "0.9.0"
version = "0.9.1"
description = "A Python service for querying IMDb data"
readme = "README.md"
license = { file = "LICENSE" }
Expand Down