Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Epic-R-R/Opensubtitle

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
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

 
 
 

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.