1

I don't now if it's place for this question...

I am developing some plugin for jDownloader, I have some problems. First question: How to check link ? I tried this way (but it doesn't work):

LinkChecker lc = new LinkChecker();
lc.check("http://rapidshare...");

I want to check if link is downloadable and after that add it to queue (how to do this ?)

Another question: How to handle captcha ? I want to get captcha code (if appears) and send to service DeathByCaptcha.com.

Thank you very much in advance,

mitch
  • 2,235
  • 3
  • 27
  • 46
  • I think you are better off looking at the JD-Developer pages since its Application specific http://jdownloader.org/knowledge/wiki/development/get-started – dngfng Sep 27 '12 at 11:44

2 Answers2

1

You really should look at the JD-Developer Site.

It has sections on how to get started, Captcha recognition, etc...

dngfng
  • 1,923
  • 17
  • 34
  • Documentation is too poor for this job. I have asked on official jDownloader forum but there is no response. – mitch Sep 27 '12 at 11:48
  • The Documentation really does suck, I guess your only hope is to look at the Source Code and comments. Or hope that someone who has done this before finds this question. – dngfng Sep 27 '12 at 11:58
  • I am looking at the Source Code all the time but there are milion of packages so it is no simple. – mitch Sep 27 '12 at 12:06
  • Don't really see what the issue is, download the source from the SVN Repo and search/browse them in Eclipse. – dngfng Sep 27 '12 at 12:07
1

Ok, thank you for suggestions. Here are solutions (maybe it'ill be useable for someone):

// CAPTCHA
// class: CaptchaDialogQueueEntry.java
// method: viaGui()
// This method handle all captcha requests and you can read it in this way:

captchaController.getCaptchaFile().toURI().toURL().toString() // this is the path of captcha file on your computer, you can read this and do anything

Checking a link

You have to add link to LinkCollector and after that you can add files do download list. Here is the code:

    LinkCollector
            .getInstance()
            .addCrawlerJob(
                    new LinkCollectingJob(
                            "http://bitshare.com/files/vddhv6sd/2002-Habakuk---Muzyka--slowa--liczba--kolor.rar.html"));

And after that you can add all added files to download list:

        for (int i = 0, c = LinkCollector.getInstance().getPackages()
                .size(); i < c; i++) {

            if (LinkCollector.getInstance().getPackages().get(i)
                    .getChildren().get(0).getSize() > 0) {
                DownloadController.getInstance().addAll(
                        LinkCollector.getInstance().convert(
                                LinkCollector.getInstance().getPackages()
                                        .get(i).getChildren(), true));
            }
        }

Everything works statically so you can create own plugin and implement it anywhere.

mitch
  • 2,235
  • 3
  • 27
  • 46