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.
User avatar
oss
Site Admin
Posts: 5878
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Re: [NEW] REST search, JSON results

Thu Mar 21, 2019 6:57 am

URLs on opensubtitles are never ending with "/". You are getting 301 to the right URL, which you should follow.
https://stackoverflow.com/questions/332 ... -upon-post

surajthomask
Posts: 3
Joined: Thu Apr 18, 2019 12:52 pm

Re: [NEW] REST search, JSON results

Thu Apr 18, 2019 2:33 pm

Hi, I have been trying to use the REST search and download corresponding subtitles using the url in the field `SubDownloadLink`.

Even though the search is working fine, I'm not able to download the subtitles. Below is the response I'm receiving;

Code: Select all

* Connection state changed (MAX_CONCURRENT_STREAMS updated)! < HTTP/2 400 < date: Thu, 18 Apr 2019 12:22:49 GMT < content-type: text/html; charset=UTF-8 < cache-control: private, must-revalidate, post-check=0, pre-check=0, no-store, max-age=0, s-max-age=0, max-stale=0 < x-cache-backend: web4 < x-cache: MISS < x-ratelimit-remaining: 40 < x-via: fw2.int.opensubtitles.org < cf-cache-status: MISS < expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" < vary: Accept-Encoding < server: cloudflare < cf-ray: 4c969b3d4d267002-SIN < * Connection #0 to host rest.opensubtitles.org left intact
Can you help me find out, what I'm doing wrong here? I have tried using the exact same code base to download files from other websites to verify if the code is correct or not.
Am I supposed to do a login before downloading the subtitle? If so, how is it working when copying and pasting in browser then?
Any help will be highly appreciated :-)

surajthomask
Posts: 3
Joined: Thu Apr 18, 2019 12:52 pm

Re: [NEW] REST search, JSON results

Fri Apr 19, 2019 1:25 pm

I was able to make the download work by removing the networking framework, and downloading directly. I have no idea why, but the download is failing when I'm hitting it through the framework. Will update here if I can find why it was behaving so.

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

Re: [NEW] REST search, JSON results

Sat Apr 20, 2019 8:10 am

strange, please update us with your findings

azeemcruiser
Posts: 1
Joined: Thu May 16, 2019 9:50 am

Re: [NEW] REST search, JSON results

Thu May 16, 2019 12:05 pm


More REST methods to play with:

Code: Select all

curl -A 'TemporaryUserAgent' http://rest.opensubtitles.org/suggest/query-a/sublanguageid-eng curl -A 'TemporaryUserAgent' http://rest.opensubtitles.org/getsublanguages/language-en curl -vvv -d 'username=your_username&password=your_password' -X POST -A 'TemporaryUserAgent v1.2' https://rest.opensubtitles.org/auth curl -vvv --user username:password -A 'TemporaryUserAgent v1.2' https://rest.opensubtitles.org/auth
If you want to download subtitles as logged in user, either use http basic auth, or add sid parameter into download link.
Can you please give some details how to add SID Parameter into Download Links ?
An working link example would be great

Im using VPS server to fetch the data from OpenSubtitle and Send to my clients, now the problem is the OpenSubtitle server is limiting the downloads by IP, since im using the VPS im hitting the limits of 200 per24hous within 12hours, how can i overcome this issue ? if i become a premium member will it help ?

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

Re: [NEW] REST search, JSON results

Mon May 20, 2019 5:48 am

Hi

it should look like this, I will update also initial post:

Code: Select all

http://dl.opensubtitles.org/en/download/src-api/vrf-19d50c5e/sid-{YOUR_SID_HERE}/filead/1951976249.gz

vaurelios
Posts: 1
Joined: Tue Jul 30, 2019 3:26 pm

Re: [NEW] REST search, JSON results

Tue Jul 30, 2019 3:36 pm

Hi,

The API apparently doesn't support leading zeros, for example:

Code: Select all

https://rest.opensubtitles.org/search/episode-05/imdbid-0455275/season-05
returns a empty response while

Code: Select all

https://rest.opensubtitles.org/search/episode-5/imdbid-0455275/season-5
returns the desired response.

Is this the desired behavior (and should be handled client-side) or this is a bug?

KAILIYAT
Posts: 2
Joined: Mon Sep 23, 2019 11:13 pm

Re: [NEW] REST search, JSON results

Mon Sep 23, 2019 11:14 pm

hi, yes instead of standard HTTP u [spam] discord [spam] ser agent you must use the user agent, which is registered for xml-rpc. I post example using "curl" command, in every language you define different user agent, for sure you will find it.
NEW: for clients unable to change default User Agent it is possible now to set up custom HTTP header 'X-User-Agent':

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

Re: [NEW] REST search, JSON results

Mon Oct 14, 2019 10:26 am

Hi,

The API apparently doesn't support leading zeros, for example:

Code: Select all

https://rest.opensubtitles.org/search/episode-05/imdbid-0455275/season-05
returns a empty response while

Code: Select all

https://rest.opensubtitles.org/search/episode-5/imdbid-0455275/season-5
returns the desired response.

Is this the desired behavior (and should be handled client-side) or this is a bug?
this is working now - following redirects is important:

Code: Select all

curl -L -A 'TemporaryUserAgent' https://rest.opensubtitles.org/search/episode-05/imdbid-0455275/season-03

mntgoat
Posts: 47
Joined: Thu Sep 24, 2015 10:41 pm

Re: [NEW] REST search, JSON results

Tue Dec 03, 2019 10:46 pm

I have a user getting a 429 error at download time, search works fine.
There isn't any way for the user to be downloading too many subtitles with my app as it is very cumbersome to do so, but I guess I don't know if someone else on their IP is doing it.
Is there another situation in which the user might get 429 or than using opensubtitles too much?

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

Re: [NEW] REST search, JSON results

Wed Dec 04, 2019 4:39 am

it is not only about download. it is also about search, it is do any HTTP REQUEST to opensubtitles. If you can, try to simulate the behavior and send me log. It is counting request per IP

mntgoat
Posts: 47
Joined: Thu Sep 24, 2015 10:41 pm

Re: [NEW] REST search, JSON results

Wed Dec 04, 2019 5:11 am

It is going to be hard getting the user to try http requests but I can see on my logs the response from opensubtitles to search and I know the error is on the download.

For example this is something I see on my logs from my own library that uses opensubtitles:

{providerType=OPENSUBTITLES, movieHash='0', movieByteSize=0, name='Frasier.S02.Extras', kind='tv series', year='1993', episode='0', season='0', language='English', downloadUrl='https://dl.opensubtitles.org/en/downloa ... 2237883.gz', detailUrl='null', fileName=Frasier [2xExtra] - Celebrity Voices CD1.srt, format=SRT, size='4585', downloadCount=27376}

I am not sure which of those subtitles the search returns he is trying but he said no subtitles work.
Also they used to work according to him and stopped recently, without any updates of the app. No other users are complaining so it is an issue only on his end.

Thanks.

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

Re: [NEW] REST search, JSON results

Fri Dec 13, 2019 7:40 am

it can be his IP is blocked, without additional debug data we can just guess what is problem exactly. If it works for you and not for him, it is possible he is using VPN or other stuff. Always good to be logged in those cases.

mntgoat
Posts: 47
Joined: Thu Sep 24, 2015 10:41 pm

Re: [NEW] REST search, JSON results

Fri Dec 13, 2019 1:42 pm

Are there instructions for how to log in with the new api?

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

Re: [NEW] REST search, JSON results

Fri Dec 20, 2019 7:09 am

not yet, new API is still in developing phase.

Return to “Developing”

Who is online

Users browsing this forum: No registered users and 33 guests