A simple API for download subtitle from opensubtitle for movies and series API is currently in BETA
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_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(file_no, output_directory, output_filename, overwrite)
file_no = required, output_directory = optional output_filename = optional overwrite = optional (default=False)