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
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 please give some details how to add SID Parameter into Download Links ?
More REST methods to play with:If you want to download subtitles as logged in user, either use http basic auth, or add sid parameter into download link.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
Code: Select all
http://dl.opensubtitles.org/en/download/src-api/vrf-19d50c5e/sid-{YOUR_SID_HERE}/filead/1951976249.gz
Code: Select all
https://rest.opensubtitles.org/search/episode-05/imdbid-0455275/season-05
Code: Select all
https://rest.opensubtitles.org/search/episode-5/imdbid-0455275/season-5
NEW: for clients unable to change default User Agent it is possible now to set up custom HTTP header 'X-User-Agent':
this is working now - following redirects is important:Hi,
The API apparently doesn't support leading zeros, for example:
returns a empty response whileCode: Select all
https://rest.opensubtitles.org/search/episode-05/imdbid-0455275/season-05
returns the desired response.Code: Select all
https://rest.opensubtitles.org/search/episode-5/imdbid-0455275/season-5
Is this the desired behavior (and should be handled client-side) or this is a bug?
Code: Select all
curl -L -A 'TemporaryUserAgent' https://rest.opensubtitles.org/search/episode-05/imdbid-0455275/season-03
Users browsing this forum: No registered users and 3 guests