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: Open subtitles API download issue

Sun Sep 19, 2021 10:30 am

if you know how we can help you, let us know :)

kva1992
Posts: 9
Joined: Sun Sep 12, 2021 6:54 am

Re: Open subtitles API download issue

Tue Sep 28, 2021 11:10 pm

Oh I got it

So, if you get the download prompt, it means the file is downloaded for the first time, coming from our server I control the headers, and can make it start downloading.

if the file has already been queried once, it'll be fetched by the cloudflare cache and just come up in your browser.
Ahh, So apparently the Cloudflare is the issue. It is blocking me from downloading it. Just confirmed this with a dev on the VLC repository. He said nothing they can do, its on your end. Anything you can do to address the issue?
Allright, so, I prepared something you can try.

https://opensubtitles.stoplight.io/docs ... nload/post

add the parameter "force_download=1" when you request the download link, let me know if it solves your problem
Any Updates on this issue?

os_dev
Posts: 194
Joined: Wed Oct 17, 2018 3:42 pm

Re: Open subtitles API download issue

Wed Sep 29, 2021 9:55 am



Ahh, So apparently the Cloudflare is the issue. It is blocking me from downloading it. Just confirmed this with a dev on the VLC repository. He said nothing they can do, its on your end. Anything you can do to address the issue?
Allright, so, I prepared something you can try.

https://opensubtitles.stoplight.io/docs ... nload/post

add the parameter "force_download=1" when you request the download link, let me know if it solves your problem
Any Updates on this issue?
it is quite strange, because it works here, important thing is to always create fresh download. If possible try to send all REQUESTS and RESPONSE, so we can debug further.
we need a precise issue to investigate

mamikel
Posts: 3
Joined: Sat Nov 13, 2021 9:44 am

Re: Open subtitles API download issue

Sat Nov 13, 2021 9:51 am

Hi,

I don't seem to be having any luck with the download api (https://api.opensubtitles.com/api/v1/download) - same 406 issue as reported above.

I can successfully search for a subtitle, but even when I try using the tooling (https://opensubtitles.stoplight.io/docs ... itles-api/) from my browser (Chrome) using a file_id retrieved in the search I get the same issue.

I'm trying to make the api call using C#, so worked example if there's one on hand would also be greatly appreciated.

thanks

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

Re: Open subtitles API download issue

Sat Nov 13, 2021 2:39 pm

please send example CURL code what is failing.

Code: Select all

curl --request POST --url 'https://api.opensubtitles.com/api/v1/download?file_id=4678812' --header 'Api-Key: <<API-KEY>>' --header 'Authorization: Bearer <<JWT>>'
works for me for example.

mamikel
Posts: 3
Joined: Sat Nov 13, 2021 9:44 am

Re: Open subtitles API download issue

Sun Nov 14, 2021 2:23 am

Hi, thanks for the quick response.

interesting, I just tried your file id now and it worked. So I tried one of the file id's I retrieved yesterday and it also worked.
It does appear there's been an update as the example has changed and there is now a C# sample! :D I'll give that a go.

cheers

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

Re: Open subtitles API download issue

Sun Nov 14, 2021 12:50 pm

for the future, anybody who have any problems with API, please send curl example (delete your API key and JWT...)

mamikel
Posts: 3
Joined: Sat Nov 13, 2021 9:44 am

Re: Open subtitles API download issue

Sat Nov 20, 2021 6:38 am

I haven't yet had success downloading a file. Is the download function available?

The curl request to get the subtitle link works fine:

Code: Select all

curl -i -X POST -H "Api-Key: [i]APIKEY[/i]" -H "Content-Type:application/json" -d "{\"file_id\": 5342665, \"sub_format\": \"srt\", \"file_name\": \"Subtitle\", \"in_fps\": 24, \"out_fps\": 24, \"timeshift\": 0, \"force_download\": true}" https://api.opensubtitles.com/api/v1/download

Response:
{"link":"https://www.opensubtitles.com/download/ ... age":"Your quota will be renewed in 19 hours and 32 minutes (2021-11-20 23:57:00 UTC) ","reset_time":"19 hours and 32 minutes","reset_time_utc":"2021-11-20T23:57:00.000Z"}

Then testing the link:

Code: Select all

curl https://www.opensubtitles.com/download/A931DC4AD225A6E3A6897646FA437DADB15463D31B2CBDACFC527C1EF26C4900661BBD68F44C0AA11E932AB0BE7499AE8ED70B365E38FC39F3AE50B4C83461BA1D160610E1C46DDBFD9A2E3B4B6FAEF8CC1C9570F09A6A7DC57A1F8734A989E993DD87E95BF3789BE9AE6CBCF10BC20BA1B502A76A596E153A9D770D125900C5246481062743C1633248796096645A958EF702B009CA40494BA1A5495CD4F7DA752321FB0BFCF60791D95E56FC72F6AAA76DB46FB34347BD90672ED08A1DFD9B1BD77BFA71D9CA13767891EC7F7603B768F024ECA645BDD017517B6E2130201FFDC19CE46793D471/subfile/Subtitle.srt --output D:\tmp\Subitle.srt

But the resulting srt file just has the error.

Error 500
Oooops. We are down.
But don't worry, we will be back up shortly.

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

Re: Open subtitles API download issue

Sun Nov 21, 2021 2:43 pm

Hi

interesting, but for me it works:
curl --request POST \
--url 'https://api.opensubtitles.com/api/v1/do ... nload=true' \
--header 'Api-Key: xxx' \
--header 'Authorization: Bearer xxx' \
response
{
"link": "https://www.opensubtitles.com/download/ ... btitle.srt",
"file_name": "Subtitle.srt",
"requests": 10,
"remaining": 990,
"message": "Your quota will be renewed in 03 hours and 50 minutes (2021-11-21 16:31:32 UTC) ",
"reset_time": "03 hours and 50 minutes",
"reset_time_utc": "2021-11-21T16:31:32.000Z"
}
try to post just simple file_id parameter and nothing more (nothing else is really needed). let us know if it works for you now

zhouss
Posts: 1
Joined: Wed Jan 05, 2022 2:17 am

Re: Open subtitles API download issue

Wed Jan 05, 2022 3:20 am

I can't download it, How do I download it?

{"link":"https://www.opensubtitles.com/download/ ... age":"Your quota will be renewed in 02 hours and 27 minutes (2022-01-05 03:45:51 UTC) ","reset_time":"02 hours and 27 minutes","reset_time_utc":"2022-01-05T03:45:51.000Z"}



link:
https://www.opensubtitles.com/download/ ... CM8-HI.srt


error info:

Error 500
Oooops. We are down.
But don't worry, we will be back up shortly.

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

Re: Open subtitles API download issue

Wed Jan 05, 2022 7:34 am

it should not return error 500, thats error on our side. Which file_id did you pass, so we can try on our side ?

nsgr
Posts: 7
Joined: Tue Jan 11, 2022 10:39 pm

Re: Open subtitles API download issue

Tue Jan 11, 2022 11:03 pm

Hi,
I was just testing the new API a bit and i get the 500 error too.
Everything works fine except downloading the actual file.

Code: Select all

curl --request POST \ --url https://api.opensubtitles.com/api/v1/download \ --header 'Api-Key: <<KEY>> \ --header 'Content-Type: application/json' \ --data '{ "file_id": 7098849, "sub_format": "srt", "file_name": "test", "in_fps": 23.976, "out_fps": 23.976, "timeshift": 0, "force_download": true }'
The response is

Code: Select all

{ "link": "https://www.opensubtitles.com/download/A17D9F7D625D51F8B241555F81C7542B38E844EEFD1447D07B6CD7E57F5869A15C57DB9F236B22AF4670D23A40FECFC1EBAD926D19919919BBFEB7AC333D3C2E01AECB80D76E0412D3243CDB4CEE6F09062CC3B456D63D651C7C47066EC81017D6BD1C2C562EA6D13282DED172AA2F4124181ABB2AA3F55A41A70764D2D6116E691F4C7F903BE3731C24574B713697EC52951B08064EDCDCD282C34227A25F88635B5BEBA2ADE4C2E1DD14239ADD61FF5FCC0C04A11B69B321860D8D675ED08067DDE484D246E30EC7BF58E743505DECB0617DEBB803C89E1B4AB614E5A7D44F1A9BDA7529D3E19BA961885162E78E94473BAAD2DC6F6D8F095871897DA3D90D/subfile/test.srt", "file_name": "test.srt", "requests": 6, "remaining": 94, "message": "Your quota will be renewed in 23 hours and 00 minutes (2022-01-12 19:09:08 UTC) ", "reset_time": "23 hours and 00 minutes", "reset_time_utc": "2022-01-12T19:09:08.000Z" }
But when i click on the download link i get "500 Error".
Things i've tried :
  • - Turn off force_download
  • - use the "Authorization: Bearer <<token>>" form /infos/user
  • - use the headers during the download of the file
  • - use only the "Authorization: Bearer <<token>>" header
  • Try different files ( file_ids : "2391341" , "7098864", "5204543" )

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

Re: Open subtitles API download issue

Wed Jan 12, 2022 6:22 am

works here, it have to been temporary error (site down), please try again and let us know (here it works, I just tried)

nsgr
Posts: 7
Joined: Tue Jan 11, 2022 10:39 pm

Re: Open subtitles API download issue

Wed Jan 12, 2022 3:00 pm

Still not working..
I used the spotlight test website.
My request :

Code: Select all

curl --request POST \ --url https://api.opensubtitles.com/api/v1/download \ --header 'Api-Key: <<token>>' \ --header 'Content-Type: application/json' \ --data '{ "file_id": 2391341, "sub_format": "srt", "file_name": "test", "in_fps": 23.976, "out_fps": 23.976, "timeshift": 0, "force_download": true }'
The response :

Code: Select all

{ "link": "https://www.opensubtitles.com/download/3311ADCB033E7838E42D42790EE818250A8A4BA0A4DFD15AAD20BAC062C8DEC9E970736C7D2A50FD1F8C54E9639666557ADAA0793F8B5F5A97AF78670BE7BC354B6D9012A0337CD0FEF2DA0861C76EC9EC377D8E0D11B6907B578A973073AE0BE7B62AE80B29FFBEF203EE01677C0B132F0F632A766FFAC9966E68885F5F00939D69820CC3AABC77FA7430B973D8125D5616CD0C1BD75FE4CF30FBD43A993C653D2778CCC50036B15198C72AD152E839B7AC98CBDC994CE367E86C6E965C1CCB3668A9812DC2EABB93B97EEE54CD86000E279DF8434BAB798E6F924EF5DB34808487F699502829DE71C5F43E2962AF57B72128B5BAEE3AC261E89B5EFF5E6694/subfile/test.srt", "file_name": "test.srt", "requests": 12, "remaining": 88, "message": "Your quota will be renewed in 06 hours and 18 minutes (2022-01-12 19:09:07 UTC) ", "reset_time": "06 hours and 18 minutes", "reset_time_utc": "2022-01-12T19:09:07.000Z" }
When i click on https://www.opensubtitles.com/download/ ... e/test.srt i get a 500 error all the time.
Is my link working for you? I just tried to download it with a different IP but it still doesn't work.

nsgr
Posts: 7
Joined: Tue Jan 11, 2022 10:39 pm

Re: Open subtitles API download issue

Wed Jan 12, 2022 3:30 pm

Okay i got it working!
I had to use

Code: Select all

--header 'Authorization: <<token>>' \ --header 'Api-Key: <<key>>' \
Yesterday i used the header from the getting started page :

Code: Select all

-H "Authorization: Bearer <<ACCESS_TOKEN>>
which results in a 500 Error for me.
If i remove the "Bearer" it works.

Return to “Developing”

Who is online

Users browsing this forum: No registered users and 34 guests