DEV Community

Smartwa
Smartwa

Posted on

Moviebox-API: Download Movies and TV Shows with Python

Moviebox-API is an unofficial Python wrapper for moviebox.ph. It lets you search, discover, and download movies, TV series, and subtitles directly from Python or through a command-line tool.


Features

  • Search and download movies, TV shows, and subtitles
  • Clean data modeling with Pydantic
  • Works with both async and sync operations
  • Comes with a simple CLI for non-developers

Installation

With CLI support:

pip install "moviebox-api[cli]"
Enter fullscreen mode Exit fullscreen mode

For developers only:

pip install moviebox-api
Enter fullscreen mode Exit fullscreen mode

Usage

Developers

Example:

from moviebox_api import MovieAuto
import asyncio

async def main():
    auto = MovieAuto()
    movie_file, subtitle_file = await auto.run("Avatar")
    print(movie_file.saved_to, subtitle_file.saved_to, sep="\n")

asyncio.run(main())
Enter fullscreen mode Exit fullscreen mode

This downloads the movie and its subtitles automatically.

Command Line

Download a movie:

moviebox download-movie "Avatar"
Enter fullscreen mode Exit fullscreen mode

Download a TV series episode:

moviebox download-series "Merlin" -s 1 -e 1
Enter fullscreen mode Exit fullscreen mode

The CLI also supports quality selection, download directories, captions, and resuming interrupted downloads.


Notes

  • Shortcut: use moviebox instead of python -m moviebox_api.
  • To use a specific mirror host, set it with an environment variable:
  export MOVIEBOX_API_HOST="your-mirror-host.com"
Enter fullscreen mode Exit fullscreen mode

Top comments (0)