Skip to content

Epic-R-R/Opensubtitle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opensubtitle-img

Opensubtitle API

A simple API for download subtitle from opensubtitle for movies and series API is currently in BETA

API

Change credentials.json file:

{
    "username": "YOURUSER",
    "password": "YOURPASS",
    "api-key": "YOURAPIKEY"
}
from openSubtitle import OpenSubtitles
op = OpenSubtitles()
op.login()
file_info = os.search_for_subtitle("MOVIE FILE PATH", "en", True)
op.download_subtitle(file_info['file_no'])

Search for a subtitle:

search_for_subtitle(full_file_path, sublanguage, forced)

full_file_path = required, sublanguage = required, forced = optional (default=False)

Returns dictionary:

{
    file_no : file_no,
    file_name: file_name
}

Download subtitle:

download_subtitle(file_no, output_directory, output_filename, overwrite)

file_no = required, output_directory = optional output_filename = optional overwrite = optional (default=False)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages