Page 4 of 9

Re: [OS] Brand new REST API for testing

Posted: Mon Apr 26, 2021 4:40 pm
by os_dev
Fixed a little bug, and added a new monitoring for the API.

You can check the status here https://92500a62-df9e-42ed-82a4-e6b3eeb ... uptime.com. (there's also a link in the API docs)

Re: [OS] Brand new REST API for testing

Posted: Tue May 25, 2021 3:52 pm
by erathostene
Hello, I am a bit confused about what endpoint should be used: all the examples I've seen seemed to use `www.opensubtitles.com`, but all the spotlight web playground in the documentation is using `api.opensubtitles.com`.

The api seems currently down (per https://92500a62-df9e-42ed-82a4-e6b3eeb ... ptime.com/ ), at least for me as I can't get a login token, but the behaviour of these 2 endpoint is different: I get a `503 Backend fetch failed` with `api.opensubtitles.com` whereas I get a timeout with the `www` subdomain.

Are these two supposed to be identical? if not, which is the right one and how do they differ?
Thx in advance

Re: [OS] Brand new REST API for testing

Posted: Fri May 28, 2021 1:52 pm
by os_dev
Hello, I am a bit confused about what endpoint should be used: all the examples I've seen seemed to use `www.opensubtitles.com`, but all the spotlight web playground in the documentation is using `api.opensubtitles.com`.

The api seems currently down (per https://92500a62-df9e-42ed-82a4-e6b3eeb ... ptime.com/ ), at least for me as I can't get a login token, but the behaviour of these 2 endpoint is different: I get a `503 Backend fetch failed` with `api.opensubtitles.com` whereas I get a timeout with the `www` subdomain.

Are these two supposed to be identical? if not, which is the right one and how do they differ?
Thx in advance
so you should always use api.opensubtitles.com, it is only working for now with www for testing purposes, but we will disable it in time.

The difference is that api and www use different gateways and caching mechanism, it is also the reason the API can be down while the site is still up, sometimes it's just the api gateway who's down.

We had major upgrades in our servers last weekend, reason for this bug on tuesday.

We are adding more replication and backups, the API should be fully reliable soon

Re: [OS] Brand new REST API for testing

Posted: Wed Jun 23, 2021 10:36 am
by kisjoke91
Oh, do you mean it can be used in production code soon?

Re: [OS] Brand new REST API for testing

Posted: Sun Jun 27, 2021 7:07 pm
by Redbirdie
Hello,
The new search api just seems to stop returning results for most files unless its name are properly formatted.

The documents states that for a better search results, one must provide the filename as query along with moviehash.

But for a filename such as

Code: Select all

Batman.The.Dark.Knight.2008.1080p.BluRay.x264.YIFY.mp4
with correct moviehash,
it will just return zero results.

But manually setting the query term to

Code: Select all

batman the dark knight 2008
returns a list of its subtitles.

But most users are not willing to type in the query terms but opt in to go for a one click quick search by just grabbing the file name directly from the video files which is done by the software.

What must one do more to sort this out? Looking forward to a response.

Re: [OS] Brand new REST API for testing

Posted: Mon Jun 28, 2021 8:04 am
by os_dev
Hello,
The new search api just seems to stop returning results for most files unless its name are properly formatted.

The documents states that for a better search results, one must provide the filename as query along with moviehash.

But for a filename such as

Code: Select all

Batman.The.Dark.Knight.2008.1080p.BluRay.x264.YIFY.mp4
with correct moviehash,
it will just return zero results.

But manually setting the query term to

Code: Select all

batman the dark knight 2008
returns a list of its subtitles.

But most users are not willing to type in the query terms but opt in to go for a one click quick search by just grabbing the file name directly from the video files which is done by the software.

What must one do more to sort this out? Looking forward to a response.
Please provide the precise query you are sending, I'm sorry I don't understand what you are trying to do and what endpoint you are trying to use.

Re: [OS] Brand new REST API for testing

Posted: Mon Jun 28, 2021 9:56 am
by Redbirdie
The query been used here is the direct file name of the video and this fails to return any results.

Code: Select all

/api/v1/subtitles?moviehash=8b37bd9eb48dd8e9&query=batman.the.dark.knight.2008.1080p.bluray.x264.yify.mp4&languages=en
The query used here is text search manually entered, and this returns the results.

Code: Select all

/api/v1/subtitles?moviehash=8b37bd9eb48dd8e9&query=batman%20the%20dark%20knight&languages=en
Why is the first search fails to return any results?

Re: [OS] Brand new REST API for testing

Posted: Mon Jun 28, 2021 5:23 pm
by Redbirdie
The query been used here is the direct file name of the video and this fails to return any results.

Code: Select all

/api/v1/subtitles?moviehash=8b37bd9eb48dd8e9&query=batman.the.dark.knight.2008.1080p.bluray.x264.yify.mp4&languages=en
The query used here is text search manually entered, and this returns the results.

Code: Select all

/api/v1/subtitles?moviehash=8b37bd9eb48dd8e9&query=batman%20the%20dark%20knight&languages=en
Why is the first search fails to return any results?
Hello, after running a thorough test, we think we may have identified a bug in your new API.
As you can see, every words in the query in the first example is lowercased. When this is the case, the API treat the whole query parameters as a single word, and fails to match with any results thus always returning a zero results.

But the exact same query(below), when the query is not lowercased , returns the expected results as it should.

Code: Select all

/api/v1/subtitles?moviehash=8b37bd9eb48dd8e9&query=Batman.The.Dark.Knight.2008.1080p.BluRay.x264.YIFY.mp4&languages=en
Looking forward to a response. Thank you

Re: [OS] Brand new REST API for testing

Posted: Mon Jun 28, 2021 7:48 pm
by os_dev
The query been used here is the direct file name of the video and this fails to return any results.

Code: Select all

/api/v1/subtitles?moviehash=8b37bd9eb48dd8e9&query=batman.the.dark.knight.2008.1080p.bluray.x264.yify.mp4&languages=en
The query used here is text search manually entered, and this returns the results.

Code: Select all

/api/v1/subtitles?moviehash=8b37bd9eb48dd8e9&query=batman%20the%20dark%20knight&languages=en
Why is the first search fails to return any results?
Hello, after running a thorough test, we think we may have identified a bug in your new API.
As you can see, every words in the query in the first example is lowercased. When this is the case, the API treat the whole query parameters as a single word, and fails to match with any results thus always returning a zero results.

But the exact same query(below), when the query is not lowercased , returns the expected results as it should.

Code: Select all

/api/v1/subtitles?moviehash=8b37bd9eb48dd8e9&query=Batman.The.Dark.Knight.2008.1080p.BluRay.x264.YIFY.mp4&languages=en
Looking forward to a response. Thank you
Hmm, I'm sorry I don't know what to tell you, uppercase/lowercase has no effect on the search, and all the examples you mention are returning results...

what are you using for your tests ? just curl ?

Re: [OS] Brand new REST API for testing

Posted: Tue Jun 29, 2021 4:52 am
by Redbirdie
Now it seems to be fixed again and returning results as it should, but from time to time, it won't return any results for the same queried filename/text search.

Why is it so? Thank you

Re: [OS] Brand new REST API for testing

Posted: Tue Jun 29, 2021 10:24 am
by os_dev
Now it seems to be fixed again and returning results as it should, but from time to time, it won't return any results for the same queried filename/text search.

Why is it so? Thank you
Nothing has been fixed on the API, nothing has changed, got down, or even rebooted in over a month.

It could happen that you get a 404 in case the api is down (didn't happen for this case) or a 429 if you make too many requests, but having the same query randomly giving you empty results is just not impossible.

so, the problem comes from your testing process, I highly recommend https://insomnia.rest or https://www.postman.com

Re: [OS] Brand new REST API for testing

Posted: Wed Jun 30, 2021 6:12 pm
by Redbirdie
Hello,
For the same queried keywords, sometimes it returns the results successfully and sometimes no results or the response below-

Code: Select all

{"total_pages":0,"total_count":0,"page":1,"data":[]}
As you are so very sure that this is not possible, then I'm not sure why this empty results above. Can you please take a look at it?

Re: [OS] Brand new REST API for testing

Posted: Fri Jul 02, 2021 1:45 pm
by os_dev
Hello,
For the same queried keywords, sometimes it returns the results successfully and sometimes no results or the response below-

Code: Select all

{"total_pages":0,"total_count":0,"page":1,"data":[]}
As you are so very sure that this is not possible, then I'm not sure why this empty results above. Can you please take a look at it?
Allright, so I took time to just sit and keep on reloading the same query for 5 minutes... and eventually got the same result...

I seriously didn't belive it to be possible, because I didn't think it was possible to get a timeout on the search result without making a 500 error. obviously I was wrong.

Really no idea at this point how that could be fixed, best I can recommend for now is to have a system in your code that repeats a query if it returns an empty result

Re: [OS] Brand new REST API for testing

Posted: Fri Sep 17, 2021 12:20 am
by shleemypants
Hi,
Thanks for the great API.

In the /download endpoint there is a property called "remove_adds" did you mean advertisement? or is it something else?

Re: [OS] Brand new REST API for testing

Posted: Fri Sep 17, 2021 7:33 am
by oss
yes, it is for removing ads. Probably good idea to rename it