Page 1 of 1

API always gives me only 1 result for each language

Posted: Sun Sep 30, 2018 6:13 pm
by dudu1542
Hello guys,

Currently I'm working on an application which I need the ability to search and download subtitles. I found out about OpenSubtitles API and decided to give that a try.

I tried to search subtitles for the movie 'Shrek' with the imdbid of tt0126029.
The problem is I only get 1 result for each language, whereas if I go and search manually, I get plenty more results.

I don't understand why there is a gap between the results I'm getting from the API and the results I'm getting on the website. I've learned that some subtitles are filterd in the process because they don't contain hash key. However, no matter which movie I search, I still get only 1 result for each language?

P.S I'm using a Node.js module called opensubtitles-api
https://github.com/vankasteelj/opensubtitles-api

Re: API always gives me only 1 result for each language

Posted: Mon Oct 01, 2018 4:32 am
by oss
Hi

Code: Select all

limit: '3', // Can be 'best', 'all' or an // arbitrary nb. Defaults to 'best'
read wrapper docs you are using.
https://github.com/vankasteelj/opensubtitles-api

Re: API always gives me only 1 result for each language

Posted: Wed Oct 03, 2018 7:51 pm
by dudu1542
Thank you very much! I managed to solve this problem by simply attaching an additional query paramater 'limit' with the value of 'all'

Re: API always gives me only 1 result for each language

Posted: Thu Oct 04, 2018 1:21 pm
by oss
no problem. Reading the docs is always good idea before asking questions.