WordRider Home
Downloading multiple files from one site
July 12, 2010 07:56AM
Hello all!

How to add a few files to download queue ? (i've got a direct link to this files?).

I'm creating plugin for [UA] sites ex.ua and luxport.ru (they are the same).
If i'm using:

Language: Java
for (int z=0; z<urls.size(); z++) { HttpMethod httpMethod = getMethodBuilder().setReferer(fileURL).setBaseURL("http://ex.ua").toGetMethod(); httpMethod.setURI(new URI(urls.get(z)));   if (!tryDownloadAndSaveFile(httpMethod)) { logger.warning(getContentAsString()); throw new IOException("File input stream is empty"); } }

And i'm getting only one record in Freerapid app, for each download it is replaced. (working in 1 stream).
Can I add each of this links as separate download ?
Re: Downloading multiple files from one site
July 12, 2010 08:08AM
Look at FAQ in wiki.

-------------------------------------

Re: Downloading multiple files from one site
July 13, 2010 06:58AM
Vity Wrote:
-------------------------------------------------------
> Look at FAQ in wiki.

Not working...
I've read FAQ, look at the usage of sourcecode from other plugins, but still nothing.

URIs have a structure similar to this:
Language: HTML
http://luxport.ru/get/2296247 http://luxport.ru/get/2296250 http://luxport.ru/get/2296252 http://luxport.ru/get/2296255 http://luxport.ru/get/2296258 http://luxport.ru/get/2296259


After using method:
Language: Java
getPluginService().getPluginContext().getQueueSupport().addLinksToQueue(httpFile, urls);
I get message INFO: The following files were added into the queue: but actually nothing is done.
When testing this plugin in FreeRapid, it shows only one download which actually downloads nothing.
Re: Downloading multiple files from one site
July 13, 2010 07:38AM
Added URLs must be supported. Are you sure that they are supported?

-------------------------------------

Re: Downloading multiple files from one site
July 13, 2010 07:43AM
Yes, downloading single file wih this link is ok.

Please find soucecode for this plugin attached.

Also I will update you checkSize method, because file size on this site is something like this "1,139,758" which is not supported by plugin.
Attachments:
open | download - luxport.zip (14.2 KB)
Re: Downloading multiple files from one site
July 13, 2010 08:51AM
As Vity said, the URLs must be supported. You are adding ex.ua links, but they are not supported by any plugin.

Change the urlRegex in plugin.xml to this if Luxport and Ex are the same thing:

[(www]\.)?(luxport\.ru|ex\.ua)/.+

Also, please don't use URL.openStream() when we have HttpClient.
only one file downloading and others are in queue?
January 18, 2011 06:15PM
the problem happen in fileserver.com only and others are good?
Sorry, only registered users may post in this forum.

Click here to login