pyopensubtitles

Python wrapper for OpenSubtitles API and a CLI tool to download subtitles


Keywords
episodes, movie, opensubtitles, python-wrapper, subtitles, xml-rpc-api
License
GPL-3.0
Install
pip install pyopensubtitles==0.1

Documentation

pyopensubtitles

Python wrapper for OpenSubtitles.org XMLRPC API

A command line utility to download subtitles for movies and episodes of TV shows from opensubtitles.org

Please do not forget to change the user agent in settings.py from the default value to the one you obtain after signing up from [OpenSubtitles.org] (https://trac.opensubtitles.org/projects/opensubtitles/wiki/DevReadFirst)

Usage

####Quickstart

fetchsubs.py The.Secret.Life.of.Walter.Mitty.2013.720p.BluRay.x264.YIFY.mp4

This will automatically download the subtitle for the given movie or a TV series episode.

usage: fetchsubs.py [-h] [--mode {auto,manual}] [--season SEASON]
                    [--episode EPISODE]
                    filename

positional arguments:
  filename

optional arguments:
  -h, --help            show this help message and exit
  --mode {auto,manual}
  --season SEASON       season number
  --episode EPISODE     episode number

You can also download manually by

fetchsubs.py --mode manual  --season 01 --episode 01 "breaking bad"

Credits

Thanks to OpenSubtitles.org