JDownloader Community - Appwork GmbH
 

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 27.09.2012, 12:33
mitchpolska
Guest
 
Posts: n/a
Default How to check link, handle captcha

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

LinkChecker lc = new LinkChecker();
lc.check("**External links are only visible to Support Staff**);

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,
Best regards from Poland
  #2  
Old 27.09.2012, 15:38
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 64,114
Default

getCaptchaCode(CaptchaAdress (or file), DownloadLink)

You can contact Coalado and Jiaz via our livechat but note that if you don't have the Java knowledge, you shouldn't do this.

GreeZ pspzockerscene
__________________
JD Supporter, Plugin Dev. & Community Manager
JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
  #3  
Old 28.09.2012, 13:32
mitchpolska
Guest
 
Posts: n/a
Default

pspzockerscene: You didn't solved my problem, why the post is marked as SOLVED ?
Anyway, here are solutions:

Quote:
// 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:

Quote:
LinkCollector
.getInstance()
.addCrawlerJob(
new LinkCollectingJob(
"**External links are only visible to Support Staff**));
And after that you can add all added files to download list:

Quote:
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.
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 11:22.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.