mirror of
https://github.com/mirror/jdownloader.git
synced 2024-12-03 17:51:35 +00:00
BugFix der Plugins
git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@18 ebf7c1c2-ba36-0410-9fe8-c592906822b4
This commit is contained in:
parent
b6052d50f3
commit
48dc64472f
@ -425,7 +425,7 @@ public class MainWindow extends JFrame implements ClipboardOwner{
|
||||
public void run(){
|
||||
|
||||
// while((downloadLink = tabDownloadTable.getNextDownloadLink()) != null){
|
||||
|
||||
downloadLink = tabDownloadTable.getNextDownloadLink();
|
||||
plugin = downloadLink.getPlugin();
|
||||
PluginStep step = plugin.getNextStep(downloadLink);
|
||||
|
||||
|
@ -12,7 +12,7 @@ import jd.plugins.PluginStep;
|
||||
import jd.plugins.RequestInfo;
|
||||
import jd.plugins.event.PluginEvent;
|
||||
/**
|
||||
* http://stealth.to/?id=7oj9t3vb0u316a8sjd66b43w1q16ku
|
||||
* http://stealth.to/?id=13wz0z8lds3nun4dihetpsqgzte4t2
|
||||
*
|
||||
* @author a
|
||||
*
|
||||
|
@ -72,17 +72,22 @@ public class Rapidshare extends PluginForHost{
|
||||
//Der Download wird bestätigt
|
||||
requestInfo = getRequest(downloadLink.getUrlDownload());
|
||||
String newURL = getFirstMatch(requestInfo.getHtmlCode(), patternForNewHost, 1);
|
||||
|
||||
//Auswahl ob free oder prem
|
||||
requestInfo = postRequest(new URL(newURL),"dl.start=free");
|
||||
|
||||
// captcha Adresse finden
|
||||
captchaAddress = getFirstMatch(requestInfo.getHtmlCode(),patternForCaptcha,1);
|
||||
|
||||
//post daten lesen
|
||||
postTarget = getFirstMatch(requestInfo.getHtmlCode(), patternForFormData, 1);
|
||||
actionString = getFirstMatch(requestInfo.getHtmlCode(), patternForFormData, 2);
|
||||
currentStep = steps.firstElement();
|
||||
if(newURL != null){
|
||||
|
||||
//Auswahl ob free oder prem
|
||||
requestInfo = postRequest(new URL(newURL),"dl.start=free");
|
||||
|
||||
// captcha Adresse finden
|
||||
captchaAddress = getFirstMatch(requestInfo.getHtmlCode(),patternForCaptcha,1);
|
||||
|
||||
//post daten lesen
|
||||
postTarget = getFirstMatch(requestInfo.getHtmlCode(), patternForFormData, 1);
|
||||
actionString = getFirstMatch(requestInfo.getHtmlCode(), patternForFormData, 2);
|
||||
currentStep = steps.firstElement();
|
||||
}
|
||||
else{
|
||||
logger.warning("file deleted?");
|
||||
}
|
||||
if(captchaAddress == null || postTarget == null || actionString == null){
|
||||
currentStep.setStatus(PluginStep.STATUS_ERROR);
|
||||
logger.warning("could not get downloadInfo");
|
||||
@ -91,6 +96,7 @@ public class Rapidshare extends PluginForHost{
|
||||
}
|
||||
catch (MalformedURLException e) { e.printStackTrace(); }
|
||||
catch (IOException e) { e.printStackTrace(); }
|
||||
|
||||
}
|
||||
int index = steps.indexOf(currentStep);
|
||||
todo = currentStep;
|
||||
@ -132,7 +138,7 @@ public class Rapidshare extends PluginForHost{
|
||||
int length = urlConnection.getContentLength();
|
||||
File fileOutput = downloadLink.getFileOutput();
|
||||
downloadLink.setDownloadLength(length);
|
||||
|
||||
logger.info("starting download");
|
||||
return download(downloadLink, urlConnection);
|
||||
}
|
||||
catch (IOException e) { logger.severe("URL could not be opened. "+e.toString());}
|
||||
|
Loading…
Reference in New Issue
Block a user