Skip to main content

cli program for subtitles download from OpenSubtitles

Project description

TV Series Renamer

Simple script in python3 that download and organize subtitles from OpenSubtitles. The purpose of the program is to make easier for user to get every subtitle associated with its related video.

How does it work

This program works in ~/Downloads (default) or in a directory passed as argument.

  1. It takes every subdirectory, video, archive and subtitle file in folder that looks like it’s a tv-series related file.
  2. After that it move archives in the corrisponding folder or extracts their contents if the video file is in the same directory of the archive.
  3. If a video file and a subtitle file are related (same tv-shows name and same season and episode) the program renames the subtitle the same as the video.

Configure OpenSubtitle account

Configure opensubtitles.json file as show in opensubtitles.json.example and put it into ~/.opensubtitles_downloader. If you want to use it anonymously don’t insert any username, otherwise use your account on OpenSubtitles.

– opensubtitles.json.example –

{
    "username": "username",
    "password": "password",
    "language": "eng",
    "useragent": "mistalbo"
}

Install package from pip

pip install --user opensubtitles-downloader

How to use it

Launch it with ~/Downloads directory as target:

$ opensubtitles_downloader

Launch it with user input directory as target:

$ opensubtitles_downloader -d <directory>

Launch it with user input file as target:

$ opensubtitles_downloader -f <filename>

Launch it with clean option:

$ opensubtitles_downloader -c

When this option is activated, the script looks for all subtitles for which there is no video file related and for all empty directories, then it put them in trash. Using the clean option doesn’t prevent the program from downloading subtitles, it’s intended as an extra action and not as an alternative to regular actions.

Contribute

Read CONTRIBUTING.md.

News

0.1.5

Release date: 07-Feb-2019

  • Fix logging to stdout

0.1.4

Release date: 07-Feb-2019

  • Improved

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for opensubtitles-downloader, version 0.1.6
Filename, size File type Python version Upload date Hashes
Filename, size opensubtitles_downloader-0.1.6-py3-none-any.whl (27.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size opensubtitles_downloader-0.1.6.tar.gz (12.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page