Forum rules
Under no circumstances is spamming or advertising of any kind allowed. Do not post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate others security. Profanity or any kind of insolent behavior to other members (regardless of rank) will not be tolerated. Remember, what you don’t find offensive can be offensive to other members. Please treat each other with the kind of reverence you’d expect from other members.
Failure to comply with any of the above will result in users being banned without notice. If any further details are needed, contact: “The team” using the link at the bottom of the forum page. Thank you.
wcominski
Posts: 4
Joined: Mon Feb 27, 2023 3:11 am

JSON API Search for Subtitle behavior

Mon Feb 27, 2023 3:44 am

Hello,
I am having an odd behavior with the search for subtitle API url.

I am using the website https://opensubtitles.stoplight.io/docs ... -subtitles to build my request however when I specify an episode_number i get no results. At first i thought the issue was that my result set didn't have the episode I specified in the search criteria; however, the result count is 22 items and I found at least 2 episode 1s.

its possible it is something im doing wrong; maybe there is a field i am not specifying along with the episode number. Hence Im here looking for help.

Here is my test, i do have an API key i just removed it from the URL.

>> Works

Code: Select all

curl --request GET \ --url 'https://api.opensubtitles.com/api/v1/subtitles?languages=en&parent_imdb_id=2480514&parent_tmdb_id=46746&season_number=1' \ --header 'Api-Key: FAKE_PAI_KEY_HERE' \ --header 'Content-Type: application/json'
>>Does not return any data ( Content-length = 0 )

Code: Select all

curl --request GET \ --url 'https://api.opensubtitles.com/api/v1/subtitles?languages=en&parent_imdb_id=2480514&parent_tmdb_id=46746&season_number=1&episode_number=1' \ --header 'Api-Key: FAKE_API_KEY_HERE' \ --header 'Content-Type: application/json'

I have tried this on the default and VIP servers and i get the same behavior.

Your help is appreciated.

wcominski
Posts: 4
Joined: Mon Feb 27, 2023 3:11 am

Re: JSON API Search for Subtitle behavior

Wed Mar 01, 2023 5:09 am

I have retested
Looks like a bug to me.
SeemsLikeAbug.png
SeemsLikeAbug.png (140.35 KiB) Viewed 2674 times

wcominski
Posts: 4
Joined: Mon Feb 27, 2023 3:11 am

Re: JSON API Search for Subtitle behavior

Wed Mar 01, 2023 5:31 am

One more find,

Looks like specifying type as
episode
breaks it as well.

according to https://opensubtitles.stoplight.io/docs ... Parameters

type is supposed to accept all, movie, episode with the default being all.

User avatar
oss
Site Admin
Posts: 5879
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Re: JSON API Search for Subtitle behavior

Wed Mar 01, 2023 1:57 pm

everything work, just specify --location to follow redirects. I will put big big red warning on DOCS, because it seems it is not enough to have there in big big red "Something wrong? Read about common mistakes and best practices"


riyajain
Posts: 2
Joined: Thu Aug 03, 2023 7:38 pm

Re: JSON API Search for Subtitle behavior

Sat Aug 05, 2023 12:10 pm

Hii,
please, explain me how we find imdb_id and tmdb_id by movies name.

User avatar
oss
Site Admin
Posts: 5879
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Re: JSON API Search for Subtitle behavior

Sat Aug 05, 2023 3:41 pm

like this:

curl --request GET \
--url 'https://api.opensubtitles.com/api/v1/fe ... ery=matrix' \
--header 'Api-Key: <YOURAPIKEY>'

Return to “Developing”

Who is online

Users browsing this forum: No registered users and 27 guests