I'm trying to download a non-direct link (I don't know how it's really called).
This is what happens:
From the explorer I just need to click the link to download. But if I copy the link to the address bar, it redirect to other page.
Where I have this problem is for example this page: http://www.subtitulos.es/show/408
All the links I need are on "descargar"
If I try to download the link, it downloads the code of the page. How can I download the file?? It's a subtitle .srt
The code I have:
final URL poster = new URL("http://www.subtitulos.es/updated/1/33565/0");
final ReadableByteChannel rbc = Channels.newChannel(poster.openStream());
final FileOutputStream fos = new FileOutputStream("C:/Users/Ricardo/Downloads/a.srt");
fos.getChannel().transferFrom(rbc, 0, 1 << 24);
fos.close();
rbc.close();
Thanks!!