diff --git a/ressourcen/outdated.dat b/ressourcen/outdated.dat
index 15f7360de3..180732f2a8 100644
--- a/ressourcen/outdated.dat
+++ b/ressourcen/outdated.dat
@@ -877,4 +877,5 @@ jd/plugins/decrypter/QckLnkM.class
jd/plugins/decrypter/SurfMvsOrg.class
jd/plugins/hoster/UploadBoostCom.class
jd/plugins/decrypter/Frdwnldzs.class
-jd/plugins/decrypter/TelonaBiz.class
\ No newline at end of file
+jd/plugins/decrypter/TelonaBiz.class
+jd/plugins/decrypter/ShareaPicNet.class
\ No newline at end of file
diff --git a/src/jd/plugins/decrypter/FilesMapCom.java b/src/jd/plugins/decrypter/FilesMapCom.java
index e19efdab69..de3d809aca 100644
--- a/src/jd/plugins/decrypter/FilesMapCom.java
+++ b/src/jd/plugins/decrypter/FilesMapCom.java
@@ -21,7 +21,6 @@ import java.util.ArrayList;
import jd.PluginWrapper;
import jd.controlling.ProgressController;
import jd.nutils.encoding.Encoding;
-import jd.parser.html.HTMLParser;
import jd.plugins.CryptedLink;
import jd.plugins.DecrypterPlugin;
import jd.plugins.DownloadLink;
@@ -55,12 +54,7 @@ public class FilesMapCom extends PluginForDecrypt {
/** Handling for all others */
String fpName = br.getRegex("property=\"og:title\" content=\"(.*?) \\(\\d+\\.?.{1,6}\\)").getMatch(0);
if (fpName == null) fpName = br.getRegex("
(.*?) \\(\\d+\\.?.{1,6}\\)").getMatch(0);
- final String pagePiece = br.getRegex("style=\"width:100%;overflow:auto;\" readonly=\"readonly\"(.*?)\"]*?)\"").getColumn(3);
if (links == null || links.length == 0) {
logger.warning("Decrypter broken for link: " + parameter);
return null;
diff --git a/src/jd/plugins/decrypter/GldSlTo.java b/src/jd/plugins/decrypter/GldSlTo.java
index 48e28bb23a..610799ee1f 100644
--- a/src/jd/plugins/decrypter/GldSlTo.java
+++ b/src/jd/plugins/decrypter/GldSlTo.java
@@ -61,17 +61,27 @@ public class GldSlTo extends PluginForDecrypt {
logger.warning("Decrypter broken for link: " + parameter);
return null;
}
- progress.setRange(decryptIDs.length);
+ final String[] streamIDs = br.getRegex("onClick=\"load_Stream\\(\\'(\\d+)\\'\\)").getColumn(0);
br.getHeaders().put("X-Requested-With", "XMLHttpRequest");
- for (String cryptID : decryptIDs) {
- br.postPage("http://goldesel.to/ajax/go2dl.php", "Download=" + cryptID);
+ for (final String cryptID : decryptIDs) {
+ br.postPage("http://goldesel.to/ajax/lddl.php", "ID=" + cryptID);
String finallink = br.toString();
if (!finallink.startsWith("http") || finallink.length() > 500) {
logger.warning("Decrypter broken for link: " + parameter);
return null;
}
decryptedLinks.add(createDownloadlink(finallink));
- progress.increase(1);
+ }
+ if (streamIDs != null && streamIDs.length != 0) {
+ for (final String streamID : streamIDs) {
+ br.postPage("http://goldesel.to/ajax/streams.php", "Stream=" + streamID);
+ String finallink = br.getRegex("\"]*?)\"").getMatch(0);
+ if (finallink == null || finallink.length() > 500) {
+ logger.warning("Decrypter broken for link: " + parameter);
+ return null;
+ }
+ decryptedLinks.add(createDownloadlink(finallink));
+ }
}
if (fpName != null) {
FilePackage fp = FilePackage.getInstance();
diff --git a/src/jd/plugins/decrypter/MngStrm.java b/src/jd/plugins/decrypter/MngStrm.java
index c0d85240b0..6b8ab941ee 100644
--- a/src/jd/plugins/decrypter/MngStrm.java
+++ b/src/jd/plugins/decrypter/MngStrm.java
@@ -17,50 +17,45 @@ import jd.plugins.PluginForDecrypt;
@DecrypterPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "mangastream.com" }, urls = { "http://[\\w\\.]*?mangastream\\.com/read/.*?/\\d+" }, flags = { 0 })
public class MngStrm extends PluginForDecrypt {
- public MngStrm(PluginWrapper wrapper) {
- super(wrapper);
- }
+ public MngStrm(PluginWrapper wrapper) {
+ super(wrapper);
+ }
- @Override
- public ArrayList decryptIt(CryptedLink parameter,
- ProgressController progress) throws Exception {
- ArrayList decryptedLinks = new ArrayList();
- br.setFollowRedirects(false);
- String url = parameter.toString();
- br.getPage(url + "/1");
- if (br.containsHTML("404: Page Not Found<"))
- return null;
- String title = br.getRegex("(.*?)- Read").getMatch(0);
- if (title == null)
- return null;
- String prefix = new Regex(url, "(/read.+)").getMatch(0);
- String pages[] = br.getRegex("\"(" + prefix + "/\\d+)\"").getColumn(0);
- if (pages == null)
- return null;
- ArrayList done = new ArrayList();
- for (String page : pages) {
- if (done.contains(page))
- continue;
- done.add(page);
- // System.out.println("---- " + page);
- }
- progress.setRange(done.size());
- NumberFormat formatter = new DecimalFormat("00");
- for (String page : done) {
- DownloadLink link = createDownloadlink("mangastream://" + page);
- link.setAvailableStatus(AvailableStatus.TRUE);
- link.setFinalFileName(title.trim()
- + " – page "
- + formatter.format(Double.parseDouble(new Regex(page,
- ".+/(\\d+)$").getMatch(0))) + ".png");
- decryptedLinks.add(link);
+ @Override
+ public ArrayList decryptIt(CryptedLink parameter, ProgressController progress) throws Exception {
+ ArrayList decryptedLinks = new ArrayList();
+ br.setFollowRedirects(false);
+ String url = parameter.toString();
+ br.getPage(url + "/1");
+ if (br.containsHTML(">We couldn\\'t find the page you were looking for<")) {
+ logger.info("Link offline: " + parameter);
+ return decryptedLinks;
+ }
+ String title = br.getRegex("(.*?)- Read").getMatch(0);
+ if (title == null) return null;
+ String prefix = new Regex(url, "(/read.+)").getMatch(0);
+ String pages[] = br.getRegex("\"(" + prefix + "/\\d+)\"").getColumn(0);
+ if (pages == null) return null;
+ ArrayList done = new ArrayList();
+ for (String page : pages) {
+ if (done.contains(page)) continue;
+ done.add(page);
+ // System.out.println("---- " + page);
+ }
+ progress.setRange(done.size());
+ NumberFormat formatter = new DecimalFormat("00");
+ for (String page : done) {
+ DownloadLink link = createDownloadlink("mangastream://" + page);
+ link.setAvailableStatus(AvailableStatus.TRUE);
+ link.setFinalFileName(title.trim() + " – page " + formatter.format(Double.parseDouble(new Regex(page, ".+/(\\d+)$").getMatch(0))) + ".png");
+ decryptedLinks.add(link);
- progress.increase(1);
- }
- FilePackage fp = FilePackage.getInstance();
- fp.setName(title.trim());
- fp.addLinks(decryptedLinks);
+ progress.increase(1);
+ }
+ FilePackage fp = FilePackage.getInstance();
+ fp.setName(title.trim());
+ fp.addLinks(decryptedLinks);
- return decryptedLinks;
- }
+ return decryptedLinks;
+ }
}
diff --git a/src/jd/plugins/decrypter/ShareaPicNet.java b/src/jd/plugins/decrypter/ShareaPicNet.java
deleted file mode 100644
index c781d82cb0..0000000000
--- a/src/jd/plugins/decrypter/ShareaPicNet.java
+++ /dev/null
@@ -1,103 +0,0 @@
-// jDownloader - Downloadmanager
-// Copyright (C) 2009 JD-Team support@jdownloader.org
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-package jd.plugins.decrypter;
-
-import java.util.ArrayList;
-
-import jd.PluginWrapper;
-import jd.controlling.ProgressController;
-import jd.parser.Regex;
-import jd.plugins.CryptedLink;
-import jd.plugins.DecrypterException;
-import jd.plugins.DecrypterPlugin;
-import jd.plugins.DownloadLink;
-import jd.plugins.FilePackage;
-import jd.plugins.PluginForDecrypt;
-import jd.utils.locale.JDL;
-
-@DecrypterPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "shareapic.net" }, urls = { "http://(www\\.)?shareapic\\.net/([0-9]+|(Zoom|View)-[0-9]+|content\\.php\\?id=[0-9]+)" }, flags = { 0 })
-public class ShareaPicNet extends PluginForDecrypt {
-
- public ShareaPicNet(PluginWrapper wrapper) {
- super(wrapper);
- }
-
- public ArrayList decryptIt(CryptedLink param, ProgressController progress) throws Exception {
- ArrayList decryptedLinks = new ArrayList();
- String parameter = param.toString();
- // content links are kinda the same as View and can be handled easily so
- // i try to use them as much as i can in the plugin
- if (parameter.contains("content")) {
- String picid = new Regex(parameter, "shareapic\\.net/content\\.php\\?id=(\\d+)").getMatch(0);
- parameter = "http://www.shareapic.net/View-" + picid;
- }
- br.setFollowRedirects(false);
- parameter = parameter.replaceAll("(View|Zoom)", "Zoom") + ".html";
- br.getPage(parameter);
-
- /* Error handling */
- if (br.containsHTML("Access Denied - This is a non-public gallery") || br.containsHTML("error404") || br.containsHTML("Image has been removed from the server")) throw new DecrypterException(JDL.L("plugins.decrypt.errormsg.unavailable", "Perhaps wrong URL or the download is not available anymore."));
-
- /* Single pictures handling */
- if (parameter.contains("Zoom") || parameter.contains("View")) {
- String finallink = getFinallink();
- if (finallink == null) return null;
- decryptedLinks.add(createDownloadlink("directhttp://" + finallink));
- return decryptedLinks;
- }
-
- /* Gallery handling */
- String fpName = br.getRegex("(.*?)\\| Shareapic\\.net").getMatch(0);
- if (fpName == null) {
- fpName = br.getRegex("NAME=\"Abstract\" CONTENT=\"(.*?)\">").getMatch(0);
- if (fpName == null) {
- fpName = br.getRegex("Description\" CONTENT=\"(.*?)\">").getMatch(0);
- if (fpName == null) {
- fpName = br.getRegex("font\\-stretch: normal; \\-x-system\\-font: none;\">(.*?)").getMatch(0);
- }
- }
- }
- String pagepiece = br.getRegex(" | [\t\n\r ]+[\t\n\r ]+ decryptIt(CryptedLink param, ProgressController progress) throws Exception {
ArrayList decryptedLinks = new ArrayList();
String parameter = param.toString();
- br.setFollowRedirects(false);
+ br.setFollowRedirects(true);
br.getPage(parameter);
String fpName = null;
// Decrypt folders
- if (parameter.contains("tgf-services.com/downloads/")) {
+ if (br.getURL().contains("tgf-services.com/downloads/")) {
if (br.getRedirectLocation() != null) {
if (br.getRedirectLocation().contains("/Warning/?err_num=15")) return decryptedLinks;
return null;
diff --git a/src/jd/plugins/decrypter/Tnypst.java b/src/jd/plugins/decrypter/Tnypst.java
index 67838f6d80..8fcc4c0bb5 100644
--- a/src/jd/plugins/decrypter/Tnypst.java
+++ b/src/jd/plugins/decrypter/Tnypst.java
@@ -29,7 +29,7 @@ import jd.plugins.DecrypterPlugin;
import jd.plugins.DownloadLink;
import jd.plugins.PluginForDecrypt;
-@DecrypterPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "tinypaste.com" }, urls = { "http://[\\w\\.]*?tinypaste\\.com/([0-9a-z]+|.*?id=[0-9a-z]+)" }, flags = { 0 })
+@DecrypterPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "tny.cz" }, urls = { "http://(www\\.)?(tinypaste\\.com|tny\\.cz)/([0-9a-z]+|.*?id=[0-9a-z]+)" }, flags = { 0 })
public class Tnypst extends PluginForDecrypt {
private DownloadLink dl = null;
@@ -42,7 +42,7 @@ public class Tnypst extends PluginForDecrypt {
public ArrayList decryptIt(CryptedLink parameter, ProgressController progress) throws Exception {
ArrayList decryptedLinks = new ArrayList();
br.setFollowRedirects(true);
- String link = parameter.toString();
+ String link = parameter.toString().replace("tinypaste.com/", "tny.cz/");
br.getPage(link);
if (br.containsHTML("(Hello, my name is 404\\!<|The page you requested is no longer here)")) {
logger.info("Link offline: " + parameter);
@@ -50,8 +50,8 @@ public class Tnypst extends PluginForDecrypt {
}
if (br.containsHTML("(Enter the correct password|has been password protected)")) {
for (int i = 0; i <= 3; i++) {
- String id = new Regex(link, "tinypaste\\.com/.*?id=([0-9a-z]+)").getMatch(0);
- if (id == null) id = new Regex(link, "tinypaste\\.com/([0-9a-z]+)").getMatch(0);
+ String id = new Regex(link, "tny\\.cz/.*?id=([0-9a-z]+)").getMatch(0);
+ if (id == null) id = new Regex(link, "tny\\.cz/([0-9a-z]+)").getMatch(0);
Form pwform = br.getForm(0);
if (pwform == null || id == null) return null;
String pw = getUserInput(null, parameter);
@@ -62,8 +62,8 @@ public class Tnypst extends PluginForDecrypt {
}
if (br.containsHTML("(Enter the correct password|has been password protected)")) throw new DecrypterException(DecrypterException.PASSWORD);
}
- String pasteFrame = br.getRegex("frameborder=\\'0\\' id=\\'pasteFrame\\' src=\"(http://tinypaste\\.com/.*?)\"").getMatch(0);
- if (pasteFrame == null) pasteFrame = br.getRegex("\"(http://tinypaste\\.com/[a-z0-9]+/fullscreen\\.php\\?hash=[a-z0-9]+\\&linenum=(false|true))\"").getMatch(0);
+ String pasteFrame = br.getRegex("frameborder=\\'0\\' id=\\'pasteFrame\\' src=\"(http://tny\\.cz/.*?)\"").getMatch(0);
+ if (pasteFrame == null) pasteFrame = br.getRegex("\"(http://tny\\.cz/[a-z0-9]+/fullscreen\\.php\\?hash=[a-z0-9]+\\&linenum=(false|true))\"").getMatch(0);
if (pasteFrame == null) {
logger.warning("Decrypter broken for link: " + parameter);
return null;
@@ -74,7 +74,7 @@ public class Tnypst extends PluginForDecrypt {
ArrayList pws = HTMLParser.findPasswords(br.toString());
for (String element : links) {
/* prevent recursion */
- if (element.contains("tinypaste.com")) continue;
+ if (element.contains("tny.cz")) continue;
decryptedLinks.add(dl = createDownloadlink(element));
if (pws != null && pws.size() > 0) dl.setSourcePluginPasswordList(pws);
}
diff --git a/src/jd/plugins/decrypter/TurboBitNetFolder.java b/src/jd/plugins/decrypter/TurboBitNetFolder.java
index 91657a5601..49145ebb43 100644
--- a/src/jd/plugins/decrypter/TurboBitNetFolder.java
+++ b/src/jd/plugins/decrypter/TurboBitNetFolder.java
@@ -29,7 +29,7 @@ import jd.plugins.PluginForDecrypt;
import jd.utils.locale.JDL;
//When adding new domains here also add them to the hosterplugin (TurboBitNet)
-@DecrypterPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "turbobit.net" }, urls = { "http://(www\\.)?(maxisoc\\.ru|turo\\-bit\\.net|depositfiles\\.com\\.ua|dlbit\\.net|sharephile\\.com|filesmail\\.ru|hotshare\\.biz|bluetooths\\.pp\\.ru|speed-file\\.ru|sharezoid\\.com|turbobit\\.pl|dz-files\\.ru|file\\.alexforum\\.ws|file\\.grad\\.by|file\\.krut-warez\\.ru|filebit\\.org|files\\.best-trainings\\.org\\.ua|files\\.wzor\\.ws|gdefile\\.ru|letitshare\\.ru|mnogofiles\\.com|share\\.uz|sibit\\.net|turbo-bit\\.ru|turbobit\\.net|upload\\.mskvn\\.by|vipbit\\.ru|files\\.prime-speed\\.ru|filestore\\.net\\.ru|turbobit\\.ru|upload\\.dwmedia\\.ru|upload\\.uz|xrfiles\\.ru|unextfiles\\.com|e-flash\\.com\\.ua|turbobax\\.net|zharabit\\.net|download\\.uzhgorod\\.name|trium-club\\.ru|alfa-files\\.com|turbabit\\.net|filedeluxe\\.com|turbobit\\.name|files\\.uz\\-translations\\.uz|turboblt\\.ru|fo\\.letitbook\\.ru|freefo\\.ru|bayrakweb\\.com)/download/folder/\\d+" }, flags = { 0 })
+@DecrypterPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "turbobit.net" }, urls = { "http://(www\\.)?(maxisoc\\.ru|turo\\-bit\\.net|depositfiles\\.com\\.ua|dlbit\\.net|sharephile\\.com|filesmail\\.ru|hotshare\\.biz|bluetooths\\.pp\\.ru|speed-file\\.ru|sharezoid\\.com|turbobit\\.pl|dz-files\\.ru|file\\.alexforum\\.ws|file\\.grad\\.by|file\\.krut-warez\\.ru|filebit\\.org|files\\.best-trainings\\.org\\.ua|files\\.wzor\\.ws|gdefile\\.ru|letitshare\\.ru|mnogofiles\\.com|share\\.uz|sibit\\.net|turbo-bit\\.ru|turbobit\\.net|upload\\.mskvn\\.by|vipbit\\.ru|files\\.prime-speed\\.ru|filestore\\.net\\.ru|turbobit\\.ru|upload\\.dwmedia\\.ru|upload\\.uz|xrfiles\\.ru|unextfiles\\.com|e-flash\\.com\\.ua|turbobax\\.net|zharabit\\.net|download\\.uzhgorod\\.name|trium-club\\.ru|alfa-files\\.com|turbabit\\.net|filedeluxe\\.com|turbobit\\.name|files\\.uz\\-translations\\.uz|turboblt\\.ru|fo\\.letitbook\\.ru|freefo\\.ru|bayrakweb\\.com|savebit\\.net)/download/folder/\\d+" }, flags = { 0 })
public class TurboBitNetFolder extends PluginForDecrypt {
public TurboBitNetFolder(PluginWrapper wrapper) {
diff --git a/src/jd/plugins/decrypter/VideoOneCom.java b/src/jd/plugins/decrypter/VideoOneCom.java
new file mode 100644
index 0000000000..bed20f1de4
--- /dev/null
+++ b/src/jd/plugins/decrypter/VideoOneCom.java
@@ -0,0 +1,195 @@
+//jDownloader - Downloadmanager
+//Copyright (C) 2009 JD-Team support@jdownloader.org
+//
+//This program is free software: you can redistribute it and/or modify
+//it under the terms of the GNU General Public License as published by
+//the Free Software Foundation, either version 3 of the License, or
+//(at your option) any later version.
+//
+//This program is distributed in the hope that it will be useful,
+//but WITHOUT ANY WARRANTY; without even the implied warranty of
+//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//GNU General Public License for more details.
+//
+//You should have received a copy of the GNU General Public License
+//along with this program. If not, see .
+
+package jd.plugins.decrypter;
+
+import java.util.ArrayList;
+import java.util.Random;
+
+import jd.PluginWrapper;
+import jd.controlling.ProgressController;
+import jd.nutils.encoding.Encoding;
+import jd.parser.Regex;
+import jd.plugins.CryptedLink;
+import jd.plugins.DecrypterPlugin;
+import jd.plugins.DownloadLink;
+import jd.plugins.PluginForDecrypt;
+
+//EmbedDecrypter 0.1.1
+@DecrypterPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "video-one.com" }, urls = { "http://(www\\.)?video\\-one\\.com/video/[a-z0-9]+\\.html" }, flags = { 0 })
+public class VideoOneCom extends PluginForDecrypt {
+
+ public VideoOneCom(PluginWrapper wrapper) {
+ super(wrapper);
+ }
+
+ public ArrayList decryptIt(CryptedLink param, ProgressController progress) throws Exception {
+ ArrayList decryptedLinks = new ArrayList();
+ String parameter = param.toString();
+ br.getPage(parameter);
+ String filename = new Regex(parameter, "http://(www\\.)?video\\-one\\.com/video/([a-z0-9]+)\\.html").getMatch(1);
+ br.getPage("http://m.8-d.com/prein");
+ final Regex th = br.getRegex("\\&t=(\\d+)\\&h=([a-z0-9]+)\"");
+ String t = th.getMatch(0);
+ String h = th.getMatch(1);
+ if (t == null || h == null) {
+ logger.warning("Decrypter broken for link: " + parameter);
+ return null;
+ }
+ br.getPage("http://m.8-d.com/in?r=&p=http://video-one.com/video/" + filename + ".html&t=" + t + "&h=" + h);
+ t = br.getRegex("var t=\\'(\\d+)\\';").getMatch(0);
+ h = br.getRegex("var h=\\'([a-z0-9]+)\\';").getMatch(0);
+ if (t == null || h == null) {
+ logger.warning("Decrypter broken for link: " + parameter);
+ return null;
+ }
+ br.getPage("http://video-one.com/iframe/" + filename + "?t=" + t + "&h=" + h + "&p=video-one.com/eval/seq/2");
+ String externID = br.getRegex("xvideos\\.com/embedframe/(\\d+)\"").getMatch(0);
+ if (externID != null) {
+ decryptedLinks.add(createDownloadlink("http://www.xvideos.com/video" + externID));
+ return decryptedLinks;
+ }
+ externID = br.getRegex("madthumbs\\.com%2Fvideos%2Fembed_config%3Fid%3D(\\d+)").getMatch(0);
+ if (externID != null) {
+ DownloadLink dl = createDownloadlink("http://www.madthumbs.com/videos/amateur/" + new Random().nextInt(100000) + "/" + externID);
+ decryptedLinks.add(dl);
+ return decryptedLinks;
+ }
+ externID = br.getRegex("(\"|\\')(http://(www\\.)?tube8\\.com/embed/[^<>\"/]*?/[^<>\"/]*?/\\d+/?)(\"|\\')").getMatch(1);
+ if (externID != null) {
+ decryptedLinks.add(createDownloadlink(externID.replace("tube8.com/embed/", "tube8.com/")));
+ return decryptedLinks;
+ }
+ externID = br.getRegex("redtube\\.com/player/\">N/A")) {
+ logger.info("Link offline: " + parameter);
+ return decryptedLinks;
+ }
+ externID = br.getRegex("(http://[^<>\"]*?)").getMatch(0);
+ if (externID == null) {
+ logger.warning("Decrypter broken for link: " + parameter);
+ return null;
+ }
+ decryptedLinks.add(createDownloadlink(externID));
+ return decryptedLinks;
+ }
+ externID = br.getRegex("(\\'|\")(http://(www\\.)?myxvids\\.com/embed_code/\\d+/\\d+/myxvids_embed\\.js)(\\'|\")").getMatch(1);
+ if (externID != null) {
+ br.getPage(externID);
+ externID = br.getRegex("var urlAddress = \"(http://[^<>\"]*?)\";").getMatch(0);
+ if (externID != null) {
+ decryptedLinks.add(createDownloadlink(externID));
+ return decryptedLinks;
+ }
+ }
+ externID = br.getRegex("player\\.empflix\\.com/video/(\\d+)\"").getMatch(0);
+ if (externID != null) {
+ decryptedLinks.add(createDownloadlink("http://www.empflix.com/videos/" + System.currentTimeMillis() + "-" + externID + ".html"));
+ return decryptedLinks;
+ }
+ externID = br.getRegex(" | ([^<>\"\\']+)").getMatch(0);
+ if (availabletraffic != null && !availabletraffic.contains("nlimited") && !availabletraffic.equalsIgnoreCase(" Mb")) {
+ ai.setTrafficLeft(SizeFormatter.getSize(availabletraffic));
+ } else {
+ ai.setUnlimitedTraffic();
+ }
+ if (account.getBooleanProperty("nopremium")) {
+ ai.setStatus("Registered (free) User");
+ try {
+ maxPrem.set(1);
+ // free accounts can still have captcha.
+ totalMaxSimultanFreeDownload.set(maxPrem.get());
+ account.setMaxSimultanDownloads(maxPrem.get());
+ account.setConcurrentUsePossible(false);
+ } catch (final Throwable e) {
+ }
+ } else {
+ String expire = new Regex(correctedBR, " | Premium(\\-| )Account expires?: | .*?()?(\\d{1,2} [A-Za-z]+ \\d{4})()? | ").getMatch(2);
+ if (expire == null) expire = new Regex(correctedBR, "(\\d{1,2} [A-Za-z]+ \\d{4})").getMatch(0);
+ if (expire == null) {
+ ai.setExpired(true);
+ account.setValid(false);
+ return ai;
+ } else {
+ expire = expire.replaceAll("(|)", "");
+ ai.setValidUntil(TimeFormatter.getMilliSeconds(expire, "dd MMMM yyyy", Locale.ENGLISH));
+ try {
+ maxPrem.set(2);
+ account.setMaxSimultanDownloads(maxPrem.get());
+ account.setConcurrentUsePossible(true);
+ } catch (final Throwable e) {
+ }
+ }
+ ai.setStatus("Premium User");
+ }
+ return ai;
+ }
+
+ @SuppressWarnings("unchecked")
+ private void login(Account account, boolean force) throws Exception {
+ synchronized (LOCK) {
+ try {
+ /** Load cookies */
+ br.setCookiesExclusive(true);
+ prepBrowser();
+ final Object ret = account.getProperty("cookies", null);
+ boolean acmatch = Encoding.urlEncode(account.getUser()).equals(account.getStringProperty("name", Encoding.urlEncode(account.getUser())));
+ if (acmatch) acmatch = Encoding.urlEncode(account.getPass()).equals(account.getStringProperty("pass", Encoding.urlEncode(account.getPass())));
+ if (acmatch && ret != null && ret instanceof HashMap, ?> && !force) {
+ final HashMap cookies = (HashMap) ret;
+ if (account.isValid()) {
+ for (final Map.Entry cookieEntry : cookies.entrySet()) {
+ final String key = cookieEntry.getKey();
+ final String value = cookieEntry.getValue();
+ this.br.setCookie(COOKIE_HOST, key, value);
+ }
+ return;
+ }
+ }
+ getPage(COOKIE_HOST + "/login.html");
+ Form loginform = br.getFormbyProperty("name", "FL");
+ if (loginform == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
+ loginform.put("login", Encoding.urlEncode(account.getUser()));
+ loginform.put("password", Encoding.urlEncode(account.getPass()));
+ sendForm(loginform);
+ if (br.getCookie(COOKIE_HOST, "login") == null || br.getCookie(COOKIE_HOST, "xfss") == null) throw new PluginException(LinkStatus.ERROR_PREMIUM, PluginException.VALUE_ID_PREMIUM_DISABLE);
+ getPage(COOKIE_HOST + "/?op=my_account");
+ if (!new Regex(correctedBR, "(Premium(\\-| )Account expire|>Renew premium<)").matches()) {
+ account.setProperty("nopremium", true);
+ } else {
+ account.setProperty("nopremium", false);
+ }
+ /** Save cookies */
+ final HashMap cookies = new HashMap();
+ final Cookies add = this.br.getCookies(COOKIE_HOST);
+ for (final Cookie c : add.getCookies()) {
+ cookies.put(c.getKey(), c.getValue());
+ }
+ account.setProperty("name", Encoding.urlEncode(account.getUser()));
+ account.setProperty("pass", Encoding.urlEncode(account.getPass()));
+ account.setProperty("cookies", cookies);
+ } catch (final PluginException e) {
+ account.setProperty("cookies", Property.NULL);
+ throw e;
+ }
+ }
+ }
+
+ @Override
+ public void handlePremium(DownloadLink link, Account account) throws Exception {
+ String passCode = null;
+ requestFileInformation(link);
+ login(account, false);
+ br.setFollowRedirects(false);
+ String dllink = null;
+ if (account.getBooleanProperty("nopremium")) {
+ getPage(link.getDownloadURL());
+ doFree(link, true, -2, "freelink2");
+ } else {
+ dllink = checkDirectLink(link, "premlink");
+ if (dllink == null) {
+ getPage(link.getDownloadURL());
+ dllink = getDllink();
+ if (dllink == null) {
+ checkErrors(link, true, passCode);
+ Form dlform = br.getFormbyProperty("name", "F1");
+ if (dlform == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
+ if (new Regex(correctedBR, PASSWORDTEXT).matches()) passCode = handlePassword(passCode, dlform, link);
+ sendForm(dlform);
+ dllink = getDllink();
+ checkErrors(link, true, passCode);
+ }
+ }
+ if (dllink == null) {
+ logger.warning("Final downloadlink (String is \"dllink\") regex didn't match!");
+ throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
+ }
+ logger.info("Final downloadlink = " + dllink + " starting the download...");
+ dl = jd.plugins.BrowserAdapter.openDownload(br, link, dllink, true, -10);
+ if (dl.getConnection().getContentType().contains("html")) {
+ logger.warning("The final dllink seems not to be a file!");
+ br.followConnection();
+ correctBR();
+ checkServerErrors();
+ throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
+ }
+ if (passCode != null) link.setProperty("pass", passCode);
+ link.setProperty("premlink", dllink);
+ dl.startDownload();
+ }
+ }
+
+ @Override
+ public int getMaxSimultanPremiumDownloadNum() {
+ /* workaround for free/premium issue on stable 09581 */
+ return maxPrem.get();
+ }
}
\ No newline at end of file
diff --git a/src/jd/plugins/hoster/XFileSharingProBasic.java b/src/jd/plugins/hoster/XFileSharingProBasic.java
index 02dbdd9578..60ded82c1c 100644
--- a/src/jd/plugins/hoster/XFileSharingProBasic.java
+++ b/src/jd/plugins/hoster/XFileSharingProBasic.java
@@ -20,6 +20,7 @@ import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.Locale;
import java.util.Map;
import java.util.SortedMap;
import java.util.TreeMap;
@@ -593,7 +594,7 @@ public class XFileSharingProBasic extends PluginForHost {
return ai;
} else {
expire = expire.replaceAll("(|)", "");
- ai.setValidUntil(TimeFormatter.getMilliSeconds(expire, "dd MMMM yyyy", null));
+ ai.setValidUntil(TimeFormatter.getMilliSeconds(expire, "dd MMMM yyyy", Locale.ENGLISH));
try {
maxPrem.set(-1);
account.setMaxSimultanDownloads(maxPrem.get());
diff --git a/src/jd/plugins/hoster/ZShareMa.java b/src/jd/plugins/hoster/ZShareMa.java
new file mode 100644
index 0000000000..afb9434989
--- /dev/null
+++ b/src/jd/plugins/hoster/ZShareMa.java
@@ -0,0 +1,98 @@
+// jDownloader - Downloadmanager
+// Copyright (C) 2010 JD-Team support@jdownloader.org
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+package jd.plugins.hoster;
+
+import java.io.IOException;
+
+import jd.PluginWrapper;
+import jd.nutils.encoding.Encoding;
+import jd.parser.html.Form;
+import jd.plugins.DownloadLink;
+import jd.plugins.DownloadLink.AvailableStatus;
+import jd.plugins.HostPlugin;
+import jd.plugins.LinkStatus;
+import jd.plugins.PluginException;
+import jd.plugins.PluginForHost;
+
+import org.appwork.utils.formatter.SizeFormatter;
+
+@HostPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "zshare.ma" }, urls = { "http://(www\\.)?(www\\d+\\.)?zshare\\.ma/[a-z0-9]{12}" }, flags = { 0 })
+public class ZShareMa extends PluginForHost {
+
+ public ZShareMa(PluginWrapper wrapper) {
+ super(wrapper);
+ }
+
+ @Override
+ public String getAGBLink() {
+ return "http://www2.zshare.ma/";
+ }
+
+ @Override
+ public AvailableStatus requestFileInformation(DownloadLink link) throws IOException, PluginException {
+ this.setBrowserExclusive();
+ br.setFollowRedirects(true);
+ br.getPage(link.getDownloadURL());
+ if (br.containsHTML("(>No such file<|>Possible causes of this error could be)")) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
+ String filename = br.getRegex("/> File Download : ([^<>\"]*?)").getMatch(0);
+ if (filename == null) {
+ filename = br.getRegex(" Download ([^<>\"]*?) \\- zSHARE ").getMatch(0);
+ if (filename == null) filename = br.getRegex("File Name: ([^<>\"]*?)").getMatch(0);
+ }
+ String filesize = br.getRegex("\\((\\d+ bytes)\\)").getMatch(0);
+ if (filename == null || filesize == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
+ link.setName(Encoding.htmlDecode(filename.trim()));
+ link.setDownloadSize(SizeFormatter.getSize(filesize));
+ return AvailableStatus.TRUE;
+ }
+
+ @Override
+ public void handleFree(DownloadLink downloadLink) throws Exception, PluginException {
+ requestFileInformation(downloadLink);
+ br.setFollowRedirects(false);
+ final Form dlform = br.getFormbyProperty("name", "F1");
+ if (dlform == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
+ br.submitForm(dlform);
+ String dllink = br.getRedirectLocation();
+ if (dllink == null) {
+ dllink = br.getRegex("\"(http://www\\d+\\.zshare\\.ma/files/[^<>\"]*?)\"").getMatch(0);
+ if (dllink == null) dllink = br.getRegex(">Click \"]*?)\"").getMatch(0);
+ }
+ if (dllink == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
+ dl = jd.plugins.BrowserAdapter.openDownload(br, downloadLink, dllink, false, 1);
+ if (dl.getConnection().getContentType().contains("html")) {
+ br.followConnection();
+ if (br.containsHTML("No file")) throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE, "Server error", 60 * 60 * 1000l);
+ throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
+ }
+ dl.startDownload();
+ }
+
+ @Override
+ public void reset() {
+ }
+
+ @Override
+ public int getMaxSimultanFreeDownloadNum() {
+ return -1;
+ }
+
+ @Override
+ public void resetDownloadlink(DownloadLink link) {
+ }
+
+}
\ No newline at end of file