mirror of
https://github.com/mirror/jdownloader.git
synced 2025-03-04 02:18:39 +00:00
- new hoster: biggerupload.com
- deleted hoster: qsave.info - updated services info in 6giga.coms' jacinfo (-rapidshark.pl -6giga.com -qsave.info) - 6giga.com: changed captcha method, other fixes - fixed tickettime, minor fixes: enterupload.com, 6giga.com, only4files.com, fileuploadshark.com, xshareware.com, sharearound.com, savefile.ro, pixelhit.com, bagruj.cz minor changes: rapidshark.pl, usershare.net git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@6218 ebf7c1c2-ba36-0410-9fe8-c592906822b4
This commit is contained in:
parent
a731b05aee
commit
4ecd28c465
@ -1,4 +1,4 @@
|
||||
<jDownloader>
|
||||
<method name="Base-Method for many hosters" author="ManiacMansion" services="6giga.com;bagruj.cz;enterupload.com;filelobster.com;fileuploadshark.com;only4files.com;pixelhit.com;qsave.info;rapidshark.pl;savefile.ro;sharearound.com;xshareware.com"/>
|
||||
<method name="Base-Method for many hosters" author="ManiacMansion" services="bagruj.cz;enterupload.com;filelobster.com;fileuploadshark.com;only4files.com;pixelhit.com;savefile.ro;sharearound.com;xshareware.com"/>
|
||||
<format type="jpg" letterNum="4"/>
|
||||
</jDownloader>
|
@ -592,11 +592,11 @@ public class JDInit {
|
||||
new HostPluginWrapper("Only4files.com", "OnlyFourFilesCom", "http://[\\w\\.]*?only4files\\.com/[\\w]+/.*");
|
||||
new HostPluginWrapper("Fileuploadshark.com", "FileuploadsharkCom", "http://[\\w\\.]*?fileuploadshark\\.com/[\\w]+/?");
|
||||
new HostPluginWrapper("Xshareware.com", "XsharewareCom", "http://[\\w\\.]*?xshareware\\.com/[\\w]+/.*");
|
||||
new HostPluginWrapper("Qsave.info", "QsaveInfo", "http://[\\w\\.]*?qsave\\.info/[\\w]+/?");
|
||||
new HostPluginWrapper("Savefile.ro", "SavefileRo", "http://[\\w\\.]*?savefile\\.ro/[\\w]+/?");
|
||||
new HostPluginWrapper("Pixelhit.com", "PixelhitCom", "http://[\\w\\.]*?pixelhit\\.com/[\\w]+/?");
|
||||
new HostPluginWrapper("Bagruj.cz", "BagrujCz", "http://[\\w\\.]*?bagruj\\.cz/.*");
|
||||
new HostPluginWrapper("Uploadline.com", "UploadlineCom", "http://[\\w\\.]*?uploadline\\.com/\\d+/.+");
|
||||
new HostPluginWrapper("Biggerupload.com", "BiggeruploadCom", "http://[\\w\\.]*?biggerupload\\.com/[\\w]+/?.*");
|
||||
new HostPluginWrapper("Ziddu.com", "ZidduCom", "http://[\\w\\.]*?ziddu\\.com/((download/\\d+/.*?\\.html)|(download\\.php\\?uid=[\\w%]+)|downloadfile/\\d+/.*?\\.html)");
|
||||
// new HostPluginWrapper("FilesDump.com", "FilesDumpCom",
|
||||
// "http://.*?filesdump\\.com/file/[a-f0-9]+/.*?");
|
||||
|
@ -64,7 +64,8 @@ public class BagrujCz extends PluginForHost {
|
||||
form.put("password", password);
|
||||
}
|
||||
// Ticket Time
|
||||
this.sleep(15000, downloadLink);
|
||||
int tt = Integer.parseInt(br.getRegex("countdown\">(\\d+)</span>").getMatch(0));
|
||||
sleep(tt * 1001, downloadLink);
|
||||
br.submitForm(form);
|
||||
URLConnectionAdapter con2 = br.getHttpConnection();
|
||||
String dllink = br.getRedirectLocation();
|
||||
@ -72,6 +73,7 @@ public class BagrujCz extends PluginForHost {
|
||||
String error = br.getRegex("class=\"err\">(.*?)</font>").getMatch(0);
|
||||
if (error != null) {
|
||||
logger.warning(error);
|
||||
con2.disconnect();
|
||||
if (error.equalsIgnoreCase("Wrong captcha") || error.equalsIgnoreCase("Expired session")) {
|
||||
throw new PluginException(LinkStatus.ERROR_CAPTCHA);
|
||||
} else {
|
||||
@ -80,7 +82,8 @@ public class BagrujCz extends PluginForHost {
|
||||
}
|
||||
if (br.containsHTML("Odkaz ke stažení vygenerován")) dllink = br.getRegex("padding:7px;\">\\s+<a\\s+href=\"(.*?)\">").getMatch(0);
|
||||
}
|
||||
dl = br.openDownload(downloadLink, dllink);
|
||||
if (dllink == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
dl = br.openDownload(downloadLink, dllink, false, 1);
|
||||
dl.startDownload();
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,9 @@
|
||||
package jd.plugins.host;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.Iterator;
|
||||
import java.util.SortedMap;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import jd.PluginWrapper;
|
||||
import jd.http.Encoding;
|
||||
@ -30,9 +32,9 @@ import jd.plugins.PluginException;
|
||||
import jd.plugins.PluginForHost;
|
||||
import jd.plugins.DownloadLink.AvailableStatus;
|
||||
|
||||
public class QsaveInfo extends PluginForHost {
|
||||
public class BiggeruploadCom extends PluginForHost {
|
||||
|
||||
public QsaveInfo(PluginWrapper wrapper) {
|
||||
public BiggeruploadCom(PluginWrapper wrapper) {
|
||||
super(wrapper);
|
||||
}
|
||||
|
||||
@ -41,7 +43,11 @@ public class QsaveInfo extends PluginForHost {
|
||||
requestFileInformation(downloadLink);
|
||||
br.setFollowRedirects(false);
|
||||
br.setDebug(true);
|
||||
if (br.containsHTML("You have reached")) {
|
||||
Form form = br.getForm(0);
|
||||
form.setAction(downloadLink.getDownloadURL());
|
||||
form.remove("method_premium");
|
||||
br.submitForm(form);
|
||||
if (br.containsHTML("You have to wait")) {
|
||||
int minutes = 0, seconds = 0, hours = 0;
|
||||
String tmphrs = br.getRegex("\\s+(\\d+)\\s+hours?").getMatch(0);
|
||||
if (tmphrs != null) hours = Integer.parseInt(tmphrs);
|
||||
@ -52,15 +58,27 @@ public class QsaveInfo extends PluginForHost {
|
||||
int waittime = ((3600 * hours) + (60 * minutes) + seconds + 1) * 1000;
|
||||
throw new PluginException(LinkStatus.ERROR_IP_BLOCKED, null, waittime);
|
||||
} else {
|
||||
Form form = br.getFormbyProperty("name", "F1");
|
||||
form = br.getFormbyProperty("name", "F1");
|
||||
if (form == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
// TODO: AntiCaptcha Method would allow simultanous connections
|
||||
String captchaurl = br.getRegex(Pattern.compile("below:</b></td></tr>\\s+<tr><td>\\s+<img src=\"(.*?)\"", Pattern.DOTALL | Pattern.CASE_INSENSITIVE)).getMatch(0);
|
||||
String code = getCaptchaCode(captchaurl, downloadLink);
|
||||
|
||||
/* "Captcha Method" */
|
||||
String[][] letters = br.getRegex("<span style='position:absolute;padding-left:(\\d+)px;padding-top:\\d+px;'>(\\d)</span>").getMatches();
|
||||
if (letters.length == 0) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
SortedMap<Integer, String> capMap = new TreeMap<Integer, String>();
|
||||
for (String[] letter : letters) {
|
||||
capMap.put(Integer.parseInt(letter[0]), letter[1]);
|
||||
}
|
||||
String code = "";
|
||||
Iterator<Integer> it = capMap.keySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
code += capMap.get(it.next());
|
||||
}
|
||||
|
||||
form.put("code", code);
|
||||
form.setAction(downloadLink.getDownloadURL());
|
||||
// No Ticket Time
|
||||
// this.sleep(15000, downloadLink);
|
||||
// Ticket Time
|
||||
int tt = Integer.parseInt(br.getRegex("countdown\">(\\d+)</span>").getMatch(0));
|
||||
sleep(tt * 1001, downloadLink);
|
||||
br.submitForm(form);
|
||||
URLConnectionAdapter con2 = br.getHttpConnection();
|
||||
String dllink = br.getRedirectLocation();
|
||||
@ -68,6 +86,7 @@ public class QsaveInfo extends PluginForHost {
|
||||
String error = br.getRegex("class=\"err\">(.*?)</font>").getMatch(0);
|
||||
if (error != null) {
|
||||
logger.warning(error);
|
||||
con2.disconnect();
|
||||
if (error.equalsIgnoreCase("Wrong captcha") || error.equalsIgnoreCase("Expired session")) {
|
||||
throw new PluginException(LinkStatus.ERROR_CAPTCHA);
|
||||
} else {
|
||||
@ -76,34 +95,31 @@ public class QsaveInfo extends PluginForHost {
|
||||
}
|
||||
if (br.containsHTML("Download Link Generated")) dllink = br.getRegex("padding:7px;\">\\s+<a\\s+href=\"(.*?)\">").getMatch(0);
|
||||
}
|
||||
dl = br.openDownload(downloadLink, dllink);
|
||||
if (dllink == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
dl = br.openDownload(downloadLink, dllink, false, 1);
|
||||
dl.startDownload();
|
||||
}
|
||||
}
|
||||
|
||||
// @Override
|
||||
// TODO: AntiCaptcha Method would allow simultanous connections
|
||||
// if user is quick; he can enter captchas one-by-one and then server allow
|
||||
// him simulatanous downloads
|
||||
// that's why I left it 10.
|
||||
public int getMaxSimultanFreeDownloadNum() {
|
||||
return 10;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// @Override
|
||||
public String getAGBLink() {
|
||||
return "http://www.qsave.info/tos.html";
|
||||
return "http://www.biggerupload.com/tos.html";
|
||||
}
|
||||
|
||||
// @Override
|
||||
public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws IOException, PluginException {
|
||||
this.setBrowserExclusive();
|
||||
br.setCookie("http://www.qsave.info/", "lang", "english");
|
||||
br.setCookie("http://www.biggerupload.com/", "lang", "english");
|
||||
br.getPage(downloadLink.getDownloadURL());
|
||||
if (br.containsHTML("No such file")) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
String filename = Encoding.htmlDecode(br.getRegex("Filename:</b></td><td\\s+nowrap>(.*?)</td>").getMatch(0));
|
||||
String filesize = br.getRegex("Size:</b></td><td>(.*?)\\s+<small>").getMatch(0);
|
||||
if (filename == null || filesize == null) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
if (br.containsHTML("(No such file)|(No such user)|(Datei nicht gefunden)")) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
String filename = Encoding.htmlDecode(br.getRegex("You\\shave\\srequested\\s<font\\scolor=\"red\">http://[\\w\\.]*?biggerupload\\.com/[a-z0-9]+/(.*?)</font>").getMatch(0));
|
||||
String filesize = br.getRegex("</font>\\s\\((.*?)\\)</font>").getMatch(0);
|
||||
if (filename == null || filesize == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
downloadLink.setName(filename);
|
||||
downloadLink.setDownloadSize(Regex.getSize(filesize));
|
||||
return AvailableStatus.TRUE;
|
||||
@ -111,7 +127,7 @@ public class QsaveInfo extends PluginForHost {
|
||||
|
||||
// @Override
|
||||
public String getVersion() {
|
||||
return getVersion("$Revision$");
|
||||
return getVersion("$Revision: 5713 $");
|
||||
}
|
||||
|
||||
// @Override
|
@ -58,13 +58,13 @@ public class EnteruploadCom extends PluginForHost {
|
||||
} else {
|
||||
form = br.getFormbyProperty("name", "F1");
|
||||
if (form == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
// TODO: AntiCaptcha Method would allow simultanous connections
|
||||
String captchaurl = br.getRegex(Pattern.compile("<img src=\"(http://www.enterupload.com/captchas/.*?\\.jpg)\">", Pattern.DOTALL | Pattern.CASE_INSENSITIVE)).getMatch(0);
|
||||
String code = getCaptchaCode(captchaurl, downloadLink);
|
||||
form.put("code", code);
|
||||
form.setAction(downloadLink.getDownloadURL());
|
||||
// Ticket Time
|
||||
this.sleep(40500, downloadLink);
|
||||
int tt = Integer.parseInt(br.getRegex("countdown\">(\\d+)</span>").getMatch(0));
|
||||
sleep(tt * 1001, downloadLink);
|
||||
br.submitForm(form);
|
||||
String dllink = br.getRedirectLocation();
|
||||
|
||||
@ -72,26 +72,21 @@ public class EnteruploadCom extends PluginForHost {
|
||||
if (error != null) {
|
||||
logger.warning(error);
|
||||
if (error.equalsIgnoreCase("Wrong captcha") || error.equalsIgnoreCase("Expired session")) {
|
||||
|
||||
throw new PluginException(LinkStatus.ERROR_CAPTCHA);
|
||||
} else {
|
||||
|
||||
throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE, error, 10000);
|
||||
}
|
||||
}
|
||||
if (br.containsHTML("Download Link Generated")) dllink = br.getRegex("padding:7px;\">\\s+<a\\s+href=\"(.*?)\">").getMatch(0);
|
||||
|
||||
br.setFollowRedirects(true);
|
||||
dl = br.openDownload(downloadLink, dllink);
|
||||
if (dllink == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
dl = br.openDownload(downloadLink, dllink, false, 1);
|
||||
dl.startDownload();
|
||||
}
|
||||
}
|
||||
|
||||
// @Override
|
||||
// TODO: AntiCaptcha Method would allow simultanous connections
|
||||
// if user is quick; he can enter captchas one-by-one and then server allow
|
||||
// him simulatanous downloads
|
||||
// that's why I left it 10.
|
||||
public int getMaxSimultanFreeDownloadNum() {
|
||||
return 10;
|
||||
}
|
||||
|
@ -54,13 +54,13 @@ public class FileuploadsharkCom extends PluginForHost {
|
||||
} else {
|
||||
Form form = br.getFormbyProperty("name", "F1");
|
||||
if (form == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
// TODO: AntiCaptcha Method would allow simultanous connections
|
||||
String captchaurl = br.getRegex(Pattern.compile("below:</b></td></tr>\\s+<tr><td><img src=\"(.*?)\"", Pattern.DOTALL | Pattern.CASE_INSENSITIVE)).getMatch(0);
|
||||
String code = getCaptchaCode(captchaurl, downloadLink);
|
||||
form.put("code", code);
|
||||
form.setAction(downloadLink.getDownloadURL());
|
||||
// Ticket Time
|
||||
this.sleep(15000, downloadLink);
|
||||
int tt = Integer.parseInt(br.getRegex("countdown\">(\\d+)</span>").getMatch(0));
|
||||
sleep(tt * 1001, downloadLink);
|
||||
br.submitForm(form);
|
||||
URLConnectionAdapter con2 = br.getHttpConnection();
|
||||
String dllink = br.getRedirectLocation();
|
||||
@ -68,6 +68,7 @@ public class FileuploadsharkCom extends PluginForHost {
|
||||
String error = br.getRegex("class=\"err\">(.*?)</font>").getMatch(0);
|
||||
if (error != null) {
|
||||
logger.warning(error);
|
||||
con2.disconnect();
|
||||
if (error.equalsIgnoreCase("Wrong captcha") || error.equalsIgnoreCase("Download session expired")) {
|
||||
throw new PluginException(LinkStatus.ERROR_CAPTCHA);
|
||||
} else {
|
||||
@ -76,16 +77,13 @@ public class FileuploadsharkCom extends PluginForHost {
|
||||
}
|
||||
if (br.containsHTML("Download Link Generated")) dllink = br.getRegex("padding:7px;\">\\s+<a\\s+href=\"(.*?)\">").getMatch(0);
|
||||
}
|
||||
dl = br.openDownload(downloadLink, dllink);
|
||||
if (dllink == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
dl = br.openDownload(downloadLink, dllink, false, 1);
|
||||
dl.startDownload();
|
||||
}
|
||||
}
|
||||
|
||||
// @Override
|
||||
// TODO: AntiCaptcha Method would allow simultanous connections
|
||||
// if user is quick; he can enter captchas one-by-one and then server allow
|
||||
// him simulatanous downloads
|
||||
// that's why I left it 10.
|
||||
public int getMaxSimultanFreeDownloadNum() {
|
||||
return 10;
|
||||
}
|
||||
|
@ -54,39 +54,31 @@ public class OnlyFourFilesCom extends PluginForHost {
|
||||
} else {
|
||||
Form form = br.getFormbyProperty("name", "F1");
|
||||
if (form == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
// TODO: AntiCaptcha Method would allow simultanous connections
|
||||
String captchaurl = br.getRegex(Pattern.compile("code:</b></td></tr>\\s+<tr><td><img src=\"(.*?)\"", Pattern.DOTALL | Pattern.CASE_INSENSITIVE)).getMatch(0);
|
||||
String code = getCaptchaCode(captchaurl, downloadLink);
|
||||
form.put("code", code);
|
||||
form.setAction("http://only4files.com/");
|
||||
// Ticket Time
|
||||
this.sleep(15000, downloadLink);
|
||||
// br.submitForm(form);
|
||||
int tt = Integer.parseInt(br.getRegex("countdown\">(\\d+)</span>").getMatch(0));
|
||||
sleep(tt * 1001, downloadLink);
|
||||
URLConnectionAdapter con2 = br.getHttpConnection();
|
||||
// String dllink = br.getRedirectLocation();
|
||||
if (con2.getContentType().contains("html")) {
|
||||
String error = br.getRegex("class=\"err\">(.*?)</font>").getMatch(0);
|
||||
if (error != null) {
|
||||
logger.warning(error);
|
||||
con2.disconnect();
|
||||
if (error.equalsIgnoreCase("Wrong captcha") || error.equalsIgnoreCase("Download session expired")) {
|
||||
throw new PluginException(LinkStatus.ERROR_CAPTCHA);
|
||||
} else {
|
||||
throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE, error, 10000);
|
||||
}
|
||||
}
|
||||
// if (br.containsHTML("Download Link Generated")) dllink =
|
||||
// br.getRegex("padding:7px;\">\\s+<a\\s+href=\"(.*?)\">").getMatch(0);
|
||||
}
|
||||
dl = br.openDownload(downloadLink, form);
|
||||
dl = br.openDownload(downloadLink, form, false, 1);
|
||||
dl.startDownload();
|
||||
}
|
||||
}
|
||||
|
||||
// @Override
|
||||
// TODO: AntiCaptcha Method would allow simultanous connections
|
||||
// if user is quick; he can enter captchas one-by-one and then server allow
|
||||
// him simulatanous downloads
|
||||
// that's why I left it 10.
|
||||
public int getMaxSimultanFreeDownloadNum() {
|
||||
return 10;
|
||||
}
|
||||
|
@ -54,13 +54,13 @@ public class PixelhitCom extends PluginForHost {
|
||||
} else {
|
||||
Form form = br.getFormbyProperty("name", "F1");
|
||||
if (form == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
// TODO: AntiCaptcha Method would allow simultanous connections
|
||||
String captchaurl = br.getRegex(Pattern.compile("below:</b></td></tr>\\s+<tr><td><img src=\"(.*?)\"", Pattern.DOTALL | Pattern.CASE_INSENSITIVE)).getMatch(0);
|
||||
String code = getCaptchaCode(captchaurl, downloadLink);
|
||||
form.put("code", code);
|
||||
form.setAction(downloadLink.getDownloadURL());
|
||||
// Ticket Time
|
||||
this.sleep(30000, downloadLink);
|
||||
int tt = Integer.parseInt(br.getRegex("countdown\">(\\d+)</span>").getMatch(0));
|
||||
sleep(tt * 1001, downloadLink);
|
||||
br.submitForm(form);
|
||||
URLConnectionAdapter con2 = br.getHttpConnection();
|
||||
String dllink = br.getRedirectLocation();
|
||||
@ -68,6 +68,7 @@ public class PixelhitCom extends PluginForHost {
|
||||
String error = br.getRegex("class=\"err\">(.*?)</font>").getMatch(0);
|
||||
if (error != null) {
|
||||
logger.warning(error);
|
||||
con2.disconnect();
|
||||
if (error.equalsIgnoreCase("Wrong captcha") || error.equalsIgnoreCase("Expired session")) {
|
||||
throw new PluginException(LinkStatus.ERROR_CAPTCHA);
|
||||
} else {
|
||||
@ -76,16 +77,13 @@ public class PixelhitCom extends PluginForHost {
|
||||
}
|
||||
if (br.containsHTML("Download Link Generated")) dllink = br.getRegex("padding:7px;\">\\s+<a\\s+href=\"(.*?)\">").getMatch(0);
|
||||
}
|
||||
dl = br.openDownload(downloadLink, dllink);
|
||||
if (dllink == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
dl = br.openDownload(downloadLink, dllink, false, 1);
|
||||
dl.startDownload();
|
||||
}
|
||||
}
|
||||
|
||||
// @Override
|
||||
// TODO: AntiCaptcha Method would allow simultanous connections
|
||||
// if user is quick; he can enter captchas one-by-one and then server allow
|
||||
// him simulatanous downloads
|
||||
// that's why I left it 10.
|
||||
public int getMaxSimultanFreeDownloadNum() {
|
||||
return 10;
|
||||
}
|
||||
|
@ -93,6 +93,7 @@ public class RapidSharkPl extends PluginForHost {
|
||||
String error = br.getRegex("class=\"err\">(.*?)</font>").getMatch(0);
|
||||
if (error != null) {
|
||||
logger.warning(error);
|
||||
con2.disconnect();
|
||||
if (error.equalsIgnoreCase("Wrong captcha") || error.equalsIgnoreCase("Expired session")) {
|
||||
throw new PluginException(LinkStatus.ERROR_CAPTCHA);
|
||||
} else {
|
||||
@ -101,6 +102,7 @@ public class RapidSharkPl extends PluginForHost {
|
||||
}
|
||||
if (br.containsHTML("Download Link Generated")) dllink = br.getRegex("padding:7px;\">\\s+<a\\s+href=\"(.*?)\">").getMatch(0);
|
||||
}
|
||||
if (dllink == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
dl = br.openDownload(downloadLink, dllink);
|
||||
dl.startDownload();
|
||||
}
|
||||
|
@ -54,13 +54,13 @@ public class SavefileRo extends PluginForHost {
|
||||
} else {
|
||||
Form form = br.getFormbyProperty("name", "F1");
|
||||
if (form == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
// TODO: AntiCaptcha Method would allow simultanous connections
|
||||
String captchaurl = br.getRegex(Pattern.compile("below:</div></b></td></tr>\\s+<tr><td><img src=\"(.*?)\"", Pattern.DOTALL | Pattern.CASE_INSENSITIVE)).getMatch(0);
|
||||
String code = getCaptchaCode(captchaurl, downloadLink);
|
||||
form.put("code", code);
|
||||
form.setAction(downloadLink.getDownloadURL());
|
||||
// Ticket Time
|
||||
this.sleep(5000, downloadLink);
|
||||
int tt = Integer.parseInt(br.getRegex("countdown\">(\\d+)</span>").getMatch(0));
|
||||
sleep(tt * 1001, downloadLink);
|
||||
br.submitForm(form);
|
||||
URLConnectionAdapter con2 = br.getHttpConnection();
|
||||
String dllink = br.getRedirectLocation();
|
||||
@ -68,6 +68,7 @@ public class SavefileRo extends PluginForHost {
|
||||
String error = br.getRegex("class=\"err\"\\s+color=\"#ffffff\">(.*?)</font>").getMatch(0);
|
||||
if (error != null) {
|
||||
logger.warning(error);
|
||||
con2.disconnect();
|
||||
if (error.equalsIgnoreCase("Wrong captcha") || error.equalsIgnoreCase("Expired session")) {
|
||||
throw new PluginException(LinkStatus.ERROR_CAPTCHA);
|
||||
} else {
|
||||
@ -76,16 +77,13 @@ public class SavefileRo extends PluginForHost {
|
||||
}
|
||||
if (br.containsHTML("Download Link Generated")) dllink = br.getRegex("Download:</font><br>\\s+<a\\s+href=\"(.*?)\"\\s+class").getMatch(0);
|
||||
}
|
||||
dl = br.openDownload(downloadLink, dllink);
|
||||
if (dllink == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
dl = br.openDownload(downloadLink, dllink, false, 1);
|
||||
dl.startDownload();
|
||||
}
|
||||
}
|
||||
|
||||
// @Override
|
||||
// TODO: AntiCaptcha Method would allow simultanous connections
|
||||
// if user is quick; he can enter captchas one-by-one and then server allow
|
||||
// him simulatanous downloads
|
||||
// that's why I left it 10.
|
||||
public int getMaxSimultanFreeDownloadNum() {
|
||||
return 10;
|
||||
}
|
||||
|
@ -54,13 +54,13 @@ public class SharearoundCom extends PluginForHost {
|
||||
} else {
|
||||
Form form = br.getFormbyProperty("name", "F1");
|
||||
if (form == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
// TODO: AntiCaptcha Method would allow simultanous connections
|
||||
String captchaurl = br.getRegex(Pattern.compile("below:</b></td></tr>\\s+<tr><td><img src=\"(.*?)\"", Pattern.DOTALL | Pattern.CASE_INSENSITIVE)).getMatch(0);
|
||||
String code = getCaptchaCode(captchaurl, downloadLink);
|
||||
form.put("code", code);
|
||||
form.setAction(downloadLink.getDownloadURL());
|
||||
// Ticket Time
|
||||
this.sleep(20000, downloadLink);
|
||||
int tt = Integer.parseInt(br.getRegex("countdown\">(\\d+)</span>").getMatch(0));
|
||||
sleep(tt * 1001, downloadLink);
|
||||
br.submitForm(form);
|
||||
URLConnectionAdapter con2 = br.getHttpConnection();
|
||||
String dllink = br.getRedirectLocation();
|
||||
@ -68,6 +68,7 @@ public class SharearoundCom extends PluginForHost {
|
||||
String error = br.getRegex("class=\"err\">(.*?)</font>").getMatch(0);
|
||||
if (error != null) {
|
||||
logger.warning(error);
|
||||
con2.disconnect();
|
||||
if (error.equalsIgnoreCase("Wrong captcha") || error.equalsIgnoreCase("Expired session")) {
|
||||
throw new PluginException(LinkStatus.ERROR_CAPTCHA);
|
||||
} else {
|
||||
@ -76,16 +77,13 @@ public class SharearoundCom extends PluginForHost {
|
||||
}
|
||||
if (br.containsHTML("Link Generated")) dllink = br.getRegex("next\\s+\\d+\\s+hours<br><br>\\s+\\s+<a\\s+href=\"(.*?)\">").getMatch(0);
|
||||
}
|
||||
dl = br.openDownload(downloadLink, dllink);
|
||||
if (dllink == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
dl = br.openDownload(downloadLink, dllink, false, 1);
|
||||
dl.startDownload();
|
||||
}
|
||||
}
|
||||
|
||||
// @Override
|
||||
// TODO: AntiCaptcha Method would allow simultanous connections
|
||||
// if user is quick; he can enter captchas one-by-one and then server allow
|
||||
// him simulatanous downloads
|
||||
// that's why I left it 10.
|
||||
public int getMaxSimultanFreeDownloadNum() {
|
||||
return 10;
|
||||
}
|
||||
|
@ -17,7 +17,9 @@
|
||||
package jd.plugins.host;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.Iterator;
|
||||
import java.util.SortedMap;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import jd.PluginWrapper;
|
||||
import jd.http.Encoding;
|
||||
@ -40,12 +42,7 @@ public class SixGigaCom extends PluginForHost {
|
||||
public void handleFree(DownloadLink downloadLink) throws Exception {
|
||||
requestFileInformation(downloadLink);
|
||||
br.setFollowRedirects(false);
|
||||
br.setDebug(true);
|
||||
Form form = br.getForm(0);
|
||||
form.setAction(downloadLink.getDownloadURL());
|
||||
form.remove("method_premium");
|
||||
form.put("referer", Encoding.urlEncode(downloadLink.getDownloadURL()));
|
||||
br.submitForm(form);
|
||||
|
||||
if (br.containsHTML("You have reached")) {
|
||||
int minutes = 0, seconds = 0, hours = 0;
|
||||
String tmphrs = br.getRegex("\\s+(\\d+)\\s+hours?").getMatch(0);
|
||||
@ -57,15 +54,25 @@ public class SixGigaCom extends PluginForHost {
|
||||
int waittime = ((3600 * hours) + (60 * minutes) + seconds + 1) * 1000;
|
||||
throw new PluginException(LinkStatus.ERROR_IP_BLOCKED, null, waittime);
|
||||
} else {
|
||||
form = br.getFormbyProperty("name", "F1");
|
||||
Form form = br.getFormbyProperty("name", "F1");
|
||||
if (form == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
// TODO: AntiCaptcha Method would allow simultanous connections
|
||||
String captchaurl = br.getRegex(Pattern.compile("below:</b></td></tr>\\s+<tr><td><img src=\"(.*?)\"", Pattern.DOTALL | Pattern.CASE_INSENSITIVE)).getMatch(0);
|
||||
String code = getCaptchaCode(captchaurl, downloadLink);
|
||||
/* "Captcha Method" */
|
||||
String[][] letters = br.getRegex("<span style='position:absolute;padding-left:(\\d+)px;padding-top:\\d+px;'>(\\d)</span>").getMatches();
|
||||
if (letters.length == 0) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
SortedMap<Integer, String> capMap = new TreeMap<Integer, String>();
|
||||
for (String[] letter : letters) {
|
||||
capMap.put(Integer.parseInt(letter[0]), letter[1]);
|
||||
}
|
||||
String code = "";
|
||||
Iterator<Integer> it = capMap.keySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
code += capMap.get(it.next());
|
||||
}
|
||||
form.put("code", code);
|
||||
form.setAction(downloadLink.getDownloadURL());
|
||||
// Ticket Time
|
||||
this.sleep(120000, downloadLink);
|
||||
int tt = Integer.parseInt(br.getRegex("countdown\">(\\d+)</span>").getMatch(0));
|
||||
sleep(tt * 1001, downloadLink);
|
||||
br.submitForm(form);
|
||||
URLConnectionAdapter con2 = br.getHttpConnection();
|
||||
String dllink = br.getRedirectLocation();
|
||||
@ -73,6 +80,7 @@ public class SixGigaCom extends PluginForHost {
|
||||
String error = br.getRegex("class=\"err\">(.*?)</font>").getMatch(0);
|
||||
if (error != null) {
|
||||
logger.warning(error);
|
||||
con2.disconnect();
|
||||
if (error.equalsIgnoreCase("Wrong captcha") || error.equalsIgnoreCase("Expired session")) {
|
||||
throw new PluginException(LinkStatus.ERROR_CAPTCHA);
|
||||
} else {
|
||||
@ -81,16 +89,13 @@ public class SixGigaCom extends PluginForHost {
|
||||
}
|
||||
if (br.containsHTML("Download Link Generated")) dllink = br.getRegex("padding:7px;\">\\s+<a\\s+href=\"(.*?)\">").getMatch(0);
|
||||
}
|
||||
dl = br.openDownload(downloadLink, dllink);
|
||||
if (dllink == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
dl = br.openDownload(downloadLink, dllink, false, 1);
|
||||
dl.startDownload();
|
||||
}
|
||||
}
|
||||
|
||||
// @Override
|
||||
// TODO: AntiCaptcha Method would allow simultanous connections
|
||||
// if user is quick; he can enter captchas one-by-one and then server allow
|
||||
// him simulatanous downloads
|
||||
// that's why I left it 10.
|
||||
public int getMaxSimultanFreeDownloadNum() {
|
||||
return 10;
|
||||
}
|
||||
@ -106,8 +111,8 @@ public class SixGigaCom extends PluginForHost {
|
||||
br.setCookie("http://www.6giga.com/", "lang", "english");
|
||||
br.getPage(downloadLink.getDownloadURL());
|
||||
if (br.containsHTML("No such file")) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
String filename = Encoding.htmlDecode(br.getRegex("You\\s+have\\s+requested\\s+<font\\s+color=\"red\">http://[\\w\\.]*?6giga\\.com/[a-z0-9]+/(.*?)</font>").getMatch(0));
|
||||
String filesize = br.getRegex("\\s+\\((.*?)\\)</font>").getMatch(0);
|
||||
String filename = Encoding.htmlDecode(br.getRegex("Filename:</b></td><td\\s+nowrap>(.*?)</b>").getMatch(0));
|
||||
String filesize = br.getRegex("Size:</b></td><td>(.*?)\\s+<small>").getMatch(0);
|
||||
if (filename == null || filesize == null) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
downloadLink.setName(filename);
|
||||
downloadLink.setDownloadSize(Regex.getSize(filesize));
|
||||
|
@ -69,7 +69,8 @@ public class UploadlineCom extends PluginForHost {
|
||||
form = br.getFormbyProperty("name", "F1");
|
||||
if (form == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
form.setAction(downloadLink.getDownloadURL());
|
||||
sleep(20500, downloadLink);
|
||||
int tt = Integer.parseInt(br.getRegex("countdown\">(\\d+)</span>").getMatch(0));
|
||||
sleep(tt * 1001, downloadLink);
|
||||
br.submitForm(form);
|
||||
URLConnectionAdapter con2 = br.getHttpConnection();
|
||||
dllink = br.getRedirectLocation();
|
||||
|
@ -40,24 +40,23 @@ public class Usershare extends PluginForHost {
|
||||
public void handleFree(DownloadLink link) throws Exception {
|
||||
requestFileInformation(link);
|
||||
String linkurl = br.getRegex(".*?flashvars=.*?<a href=\"(.*?)\"><img src=\"/images/download_btn.jpg\" border=0>").getMatch(0);
|
||||
if (linkurl == null)
|
||||
{
|
||||
if (linkurl == null) {
|
||||
linkurl = br.getRegex(".*?document.oncontextmenu=new Function.*?<a href=\"(.*?)\"><img src=\"/images/download_btn.jpg\" border=0>").getMatch(0);
|
||||
if(linkurl == null)throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
}
|
||||
if (linkurl == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
}
|
||||
br.setFollowRedirects(true);
|
||||
|
||||
|
||||
dl = br.openDownload(link, linkurl, true, -10);
|
||||
dl.startDownload();
|
||||
dl.startDownload();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AvailableStatus requestFileInformation(DownloadLink parameter) throws Exception {
|
||||
this.setBrowserExclusive();
|
||||
br.getPage(parameter.getDownloadURL());
|
||||
if(br.containsHTML("No such user exist") || br.containsHTML("File Not Found")) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
if (br.containsHTML("No such user exist") || br.containsHTML("File Not Found")) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
String filename = br.getRegex("<title>(.*?)</title>").getMatch(0);
|
||||
String filesize = br.getRegex("Size:</b></td><td>(.*?)<small>").getMatch(0);
|
||||
String filesize = br.getRegex("Size:</b></td><td>(.*?)<small>").getMatch(0);
|
||||
if (filename == null || filesize == null) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
parameter.setName(filename.trim());
|
||||
parameter.setDownloadSize(Regex.getSize(filesize.replaceAll(",", "\\.")));
|
||||
@ -67,20 +66,20 @@ public class Usershare extends PluginForHost {
|
||||
@Override
|
||||
public void reset() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetDownloadlink(DownloadLink link) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVersion() {
|
||||
return getVersion("$Revision$");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getMaxSimultanFreeDownloadNum() {
|
||||
return 20;
|
||||
|
@ -41,51 +41,39 @@ public class XsharewareCom extends PluginForHost {
|
||||
requestFileInformation(downloadLink);
|
||||
br.setFollowRedirects(false);
|
||||
br.setDebug(true);
|
||||
if (br.containsHTML("You have reached")) {
|
||||
int minutes = 0, seconds = 0, hours = 0;
|
||||
String tmphrs = br.getRegex("\\s+(\\d+)\\s+hours?").getMatch(0);
|
||||
if (tmphrs != null) hours = Integer.parseInt(tmphrs);
|
||||
String tmpmin = br.getRegex("\\s+(\\d+)\\s+minutes?").getMatch(0);
|
||||
if (tmpmin != null) minutes = Integer.parseInt(tmpmin);
|
||||
String tmpsec = br.getRegex("\\s+(\\d+)\\s+seconds?").getMatch(0);
|
||||
if (tmpsec != null) seconds = Integer.parseInt(tmpsec);
|
||||
int waittime = ((3600 * hours) + (60 * minutes) + seconds + 1) * 1000;
|
||||
throw new PluginException(LinkStatus.ERROR_IP_BLOCKED, null, waittime);
|
||||
} else {
|
||||
Form form = br.getFormbyProperty("name", "F1");
|
||||
if (form == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
// TODO: AntiCaptcha Method would allow simultanous connections
|
||||
String captchaurl = br.getRegex(Pattern.compile("below:</b></td></tr>\\s+<tr><td><img src=\"(.*?)\"", Pattern.DOTALL | Pattern.CASE_INSENSITIVE)).getMatch(0);
|
||||
String code = getCaptchaCode(captchaurl, downloadLink);
|
||||
form.put("code", code);
|
||||
form.setAction(downloadLink.getDownloadURL());
|
||||
// Ticket Time
|
||||
this.sleep(60000, downloadLink);
|
||||
br.submitForm(form);
|
||||
URLConnectionAdapter con2 = br.getHttpConnection();
|
||||
String dllink = br.getRedirectLocation();
|
||||
if (con2.getContentType().contains("html")) {
|
||||
String error = br.getRegex("class=\"err\">(.*?)</font>").getMatch(0);
|
||||
if (error != null) {
|
||||
logger.warning(error);
|
||||
if (error.equalsIgnoreCase("Wrong captcha") || error.equalsIgnoreCase("Expired session")) {
|
||||
throw new PluginException(LinkStatus.ERROR_CAPTCHA);
|
||||
} else {
|
||||
throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE, error, 10000);
|
||||
}
|
||||
|
||||
Form form = br.getFormbyProperty("name", "F1");
|
||||
if (form == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
String captchaurl = br.getRegex(Pattern.compile("below:</b></td></tr>\\s+<tr><td><img src=\"(.*?)\"", Pattern.DOTALL | Pattern.CASE_INSENSITIVE)).getMatch(0);
|
||||
String code = getCaptchaCode(captchaurl, downloadLink);
|
||||
form.put("code", code);
|
||||
form.setAction(downloadLink.getDownloadURL());
|
||||
// Ticket Time
|
||||
int tt = Integer.parseInt(br.getRegex("countdown\">(\\d+)</span>").getMatch(0));
|
||||
sleep(tt * 1001, downloadLink);
|
||||
br.submitForm(form);
|
||||
URLConnectionAdapter con2 = br.getHttpConnection();
|
||||
String dllink = br.getRedirectLocation();
|
||||
if (con2.getContentType().contains("html")) {
|
||||
String error = br.getRegex("class=\"err\">(.*?)</font>").getMatch(0);
|
||||
if (error != null) {
|
||||
logger.warning(error);
|
||||
con2.disconnect();
|
||||
if (error.equalsIgnoreCase("Wrong captcha") || error.equalsIgnoreCase("Expired session")) {
|
||||
throw new PluginException(LinkStatus.ERROR_CAPTCHA);
|
||||
} else {
|
||||
throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE, error, 10000);
|
||||
}
|
||||
if (br.containsHTML("Link Generated")) dllink = br.getRegex("next\\s+\\d+\\s+hours<br><br>\\s+\\s+<a\\s+href=\"(.*?)\">").getMatch(0);
|
||||
}
|
||||
dl = br.openDownload(downloadLink, dllink);
|
||||
dl.startDownload();
|
||||
if (br.containsHTML("Link Generated")) dllink = br.getRegex("next\\s+\\d+\\s+hours<br><br>\\s+\\s+<a\\s+href=\"(.*?)\">").getMatch(0);
|
||||
}
|
||||
if (dllink == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFEKT);
|
||||
dl = br.openDownload(downloadLink, dllink, false, 1);
|
||||
dl.startDownload();
|
||||
|
||||
}
|
||||
|
||||
// @Override
|
||||
// TODO: AntiCaptcha Method would allow simultanous connections
|
||||
// if user is quick; he can enter captchas one-by-one and then server allow
|
||||
// him simulatanous downloads
|
||||
// that's why I left it 10.
|
||||
public int getMaxSimultanFreeDownloadNum() {
|
||||
return 10;
|
||||
}
|
||||
@ -99,6 +87,18 @@ public class XsharewareCom extends PluginForHost {
|
||||
public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws IOException, PluginException {
|
||||
this.setBrowserExclusive();
|
||||
br.getPage(downloadLink.getDownloadURL());
|
||||
if (br.containsHTML("You have reached")) {
|
||||
int minutes = 0, seconds = 0, hours = 0;
|
||||
String tmphrs = br.getRegex("\\s+(\\d+)\\s+hours?").getMatch(0);
|
||||
if (tmphrs != null) hours = Integer.parseInt(tmphrs);
|
||||
String tmpmin = br.getRegex("\\s+(\\d+)\\s+minutes?").getMatch(0);
|
||||
if (tmpmin != null) minutes = Integer.parseInt(tmpmin);
|
||||
String tmpsec = br.getRegex("\\s+(\\d+)\\s+seconds?").getMatch(0);
|
||||
if (tmpsec != null) seconds = Integer.parseInt(tmpsec);
|
||||
int waittime = ((3600 * hours) + (60 * minutes) + seconds + 1) * 1000;
|
||||
logger.warning("Your IP was blocked for some minutes. Try it later again or do a reconnect");
|
||||
throw new PluginException(LinkStatus.ERROR_IP_BLOCKED, null, waittime);
|
||||
}
|
||||
if (br.containsHTML("No such file")) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
String filename = Encoding.htmlDecode(br.getRegex("File\\s+Name:\\s+<b>(.*?)</b>").getMatch(0));
|
||||
String filesize = br.getRegex("File\\s+Size:\\s+(.*?)<br>").getMatch(0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user