Page 1 of 1

iconv() downloads captcha

Posted: Thu Jul 23, 2015 2:47 am
by MarcoTC
Since I cannot find a way to download the with iconv() converted subtitles using the API, I'm using direct downloads (for example: http://dl.opensubtitles.org/en/download ... 1954602263).

After doing xx downloads, the IP ends up on the captcha block.
Is there a way to do this via the API?
If not, is there a way bypass the captcha by (for example) authorizing via username and password as parameters? (And then when reaching a download limit, an error response?)

Re: iconv() downloads captcha

Posted: Thu Jul 23, 2015 7:49 am
by oss
from where you got that link ?

in SearchSubtitles() XMLRPC response is links like this even you are not logged in (empty username and password):

Code: Select all

[SubDownloadLink] => http://dl.opensubtitles.org/en/download/filead/src-api/vrf-ef3a1f1e6e/sid-f5d2c3grp3kle26jkt1m7b6et4/1954677189.gz [ZipDownloadLink] => http://dl.opensubtitles.org/en/download/subad/src-api/vrf-411f923197/sid-f5d2c3grp3kle26jkt1m7b6et4/6097361 [SubtitlesLink] => http://www.opensubtitles.org/en/subtitles/6097361/sid-f5d2c3grp3kle26jkt1m7b6et4/insurgent-ro
Then you can pass subencoding parameter into it, but dont delete any other parameter. Example:

Code: Select all

http://dl.opensubtitles.org/en/download/subencoding-utf8/filead/src-api/vrf-ef3a1f1e6e/sid-f5d2c3grp3kle26jkt1m7b6et4/1954677189 http://dl.opensubtitles.org/en/download/subencoding-utf8/filead/src-api/vrf-ef3a1f1e6e/sid-f5d2c3grp3kle26jkt1m7b6et4/1954677189.gz http://dl.opensubtitles.org/en/download/subformat-vtt/filead/src-api/vrf-ef3a1f1e6e/sid-f5d2c3grp3kle26jkt1m7b6et4/1954677189
for vtt format subencoding is always utf8. I will update trac. This functions are still in beta.

Re: iconv() downloads captcha

Posted: Thu Jul 23, 2015 10:54 am
by SmallBrother
from where you got that link ?
I think from you on viewtopic.php?f=8&t=14992
;-)

Re: iconv() downloads captcha

Posted: Thu Jul 23, 2015 11:34 am
by oss
ok got it. Well, it works, but then you will have CAPTCHA there, because it is "anonymous" link.

Re: iconv() downloads captcha

Posted: Thu Jul 23, 2015 8:20 pm
by MarcoTC
I understand. Excellent. Thank you.

Re: iconv() downloads captcha

Posted: Thu Aug 06, 2015 10:36 pm
by MarcoTC
Oss,

If I have a IDSubtitleFile, I use the DownloadSubtitles method. However, I cannot pass the encoding type with it.
Is it somehow still possible to generate a valid iconv() download link if I only have the IDSubtitleFile?

Re: iconv() downloads captcha

Posted: Fri Aug 07, 2015 10:58 am
by oss
from API you got something like

[SubDownloadLink] => http://dl.opensubtitles.org/en/download ... 4677189.gz

so you have to convert this automatically to

http://dl.opensubtitles.org/en/download ... 1954677189

so after "download/" you have to add subencoding...

works for you ?