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 forced language:

$ opensubtitles_downloader -l fr -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.2.1

Release date: 19-Nov-2020

  • Removed ‘guessit’ library (it was causing verbose output)

0.2.0

Release date: 18-Nov-2020

  • Added ‘guessit’ library

  • Opensubtitles download doesn’t fully trust hash, check that subtitle filename is correct.

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.

Source Distribution

opensubtitles_downloader-1.0.6.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opensubtitles_downloader-1.0.6-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

Details for the file opensubtitles_downloader-1.0.6.tar.gz.

File metadata

  • Download URL: opensubtitles_downloader-1.0.6.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.4.2 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

File hashes

Hashes for opensubtitles_downloader-1.0.6.tar.gz
Algorithm Hash digest
SHA256 61603a1deb297dac04caee01541151f05c16d32a64869060278c2cee7179c598
MD5 237e3099dd803d9c1bf751b98dcec9d9
BLAKE2b-256 b1c33fc68c54ad3e16a0329a416d72e0d38655e1da7dce89169ec60acfdf832d

See more details on using hashes here.

File details

Details for the file opensubtitles_downloader-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: opensubtitles_downloader-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 28.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.4.2 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

File hashes

Hashes for opensubtitles_downloader-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 9bc77c51b3abdfe95d9cce373bf565cae04b1c89da0e65fd0a9eee1a814cf10d
MD5 a0b800426f15b0f8777d9489b6bf9284
BLAKE2b-256 1da6424351fb89efcd9acb800cbbb89a8e0abeac6fdcbca89fb9f72714fd48ae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page