*Plugins: Fixes/Changes/Maintenance*

- GenericWBoardDecrypter: added new domain mdhto and updated pattern RE forum 90887

*Plugins: RIP*
- GenericWBoardDecrypter: funxd.tv, 3ddl.tv

git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@49589 ebf7c1c2-ba36-0410-9fe8-c592906822b4

Former-commit-id: 75a2584f1d868dd57c7c4a0dbe16136aec85ec3d
This commit is contained in:
psp 2024-08-13 15:33:22 +00:00
parent 9a3f9c061e
commit 7ce42d3343

View File

@ -19,7 +19,7 @@ import jd.plugins.FilePackage;
import jd.plugins.LinkStatus;
import jd.plugins.PluginException;
@DecrypterPlugin(revision = "$Revision$", interfaceVersion = 3, names = { "warez-world.org", "ddl-mdh.org", "funxd.tv" }, urls = { "https?://(?:www\\.)?(?:warez-world\\.org|3ddl\\.tv)/(?:download/[^/]+|link/\\d+/\\d+)", "https?://(?:www\\.)?ddl-mdh\\.org/(?:download/[^/]+|link/\\d+/\\d+)", "https?://(?:www\\.)?funxd\\.tv/(?:download/[^/]+|link/\\d+/\\d+)" })
@DecrypterPlugin(revision = "$Revision$", interfaceVersion = 3, names = { "warez-world.org", "ddl-mdh.org" }, urls = { "https?://(?:www\\.)?warez-world\\.org/(?:download/[^/]+|link/\\d+/\\d+)", "https?://(?:www\\.)?(?:ddl-mdh\\.org|mdh\\.to)/(?:download/[^/]+|video/[^/]+|link/\\d+/\\d+)" })
public class GenericWBoardDecrypter extends antiDDoSForDecrypt {
public GenericWBoardDecrypter(PluginWrapper wrapper) {
super(wrapper);
@ -28,62 +28,63 @@ public class GenericWBoardDecrypter extends antiDDoSForDecrypt {
@Override
public ArrayList<DownloadLink> decryptIt(CryptedLink param, ProgressController progress) throws Exception {
final ArrayList<DownloadLink> ret = new ArrayList<DownloadLink>();
String parameter = param.toString();
final String parameter = param.getCryptedUrl();
br.setFollowRedirects(true);
getPage(parameter);
if (!canHandle(br.getURL())) {
// invalid/offline link, redirect to main domain
return ret;
throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
}
if (StringUtils.containsIgnoreCase(parameter, "/link/")) {
final String[] fileIDs = new Regex(parameter, "/link/(\\d+)/(\\d+)").getRow(0);
if (fileIDs == null || fileIDs.length != 2) {
throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
}
if (br.containsHTML("grecaptcha")) {
final Form captcha = br.getForm(0);
final String sitekey = br.getRegex("sitekey\\s*:\\s*\"([^\"]+)\"").getMatch(0);
final String recaptchaV2Response = new CaptchaHelperCrawlerPluginRecaptchaV2(this, br, sitekey) {
@Override
public org.jdownloader.captcha.v2.challenge.recaptcha.v2.AbstractRecaptchaV2.TYPE getType() {
return TYPE.INVISIBLE;
};
}.getToken();
captcha.put("original", "");
captcha.put("q", fileIDs[0]);
captcha.put("sq", fileIDs[1]);
captcha.put("tk", Encoding.urlEncode(recaptchaV2Response));
submitForm(captcha);
if (canHandle(br.getURL())) {
throw new PluginException(LinkStatus.ERROR_CAPTCHA);
} else {
final DownloadLink downloadLink = createDownloadlink(br.getURL());
ret.add(downloadLink);
}
} else {
final Form captchaform = br.getForm(0);
final String sitekey = br.getRegex("sitekey\\s*:\\s*\"([^\"]+)\"").getMatch(0);
if (captchaform == null || sitekey == null) {
throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
}
final String recaptchaV2Response = new CaptchaHelperCrawlerPluginRecaptchaV2(this, br, sitekey) {
@Override
public org.jdownloader.captcha.v2.challenge.recaptcha.v2.AbstractRecaptchaV2.TYPE getType() {
return TYPE.INVISIBLE;
};
}.getToken();
captchaform.put("original", "");
captchaform.put("q", fileIDs[0]);
captchaform.put("sq", fileIDs[1]);
captchaform.put("tk", Encoding.urlEncode(recaptchaV2Response));
br.setFollowRedirects(false);
submitForm(captchaform);
final String finallink = br.getRedirectLocation();
if (finallink == null || canHandle(finallink)) {
/* Redirect to same link */
throw new PluginException(LinkStatus.ERROR_CAPTCHA);
}
final DownloadLink downloadLink = createDownloadlink(finallink);
ret.add(downloadLink);
} else {
final String title = br.getRegex("<title>\\s*([^<]+)\\s*&(?:r|l)aquo;").getMatch(0);
final String[] links = br.getRegex("href\\s*=\\s*\"(/link/([^\"]+))\"").getColumn(0);
if (links == null || links.length == 0) {
final String title = br.getRegex("<title>\\s*([^<]+)").getMatch(0);
final String[] urls = br.getRegex("href\\s*=\\s*\"(/link/([^\"]+))\"").getColumn(0);
if (urls == null || urls.length == 0) {
throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
}
String password = br.getRegex(">\\s*Passwort:\\s*</div>\\s*<div class=\"ui2\">\\s*([^<]+)\\s*</div>").getMatch(0);
if (password == null) {
password = br.getRegex("<span>\\s*Passwor(?:d|t):\\s*</span>\\s*(.*?)\\s*<").getMatch(0);
}
for (final String link : links) {
final String url = br.getURL(Encoding.htmlDecode(link)).toString();
final DownloadLink downloadLink = createDownloadlink(url);
for (String url : urls) {
url = br.getURL(Encoding.htmlDecode(url)).toExternalForm();
final DownloadLink dlink = createDownloadlink(url);
if (StringUtils.isNotEmpty(password) && !StringUtils.equalsIgnoreCase(password, "Kein Passwort")) {
downloadLink.setSourcePluginPasswordList(new ArrayList<String>(Arrays.asList(password)));
dlink.setSourcePluginPasswordList(new ArrayList<String>(Arrays.asList(password)));
}
ret.add(downloadLink);
ret.add(dlink);
}
if (title != null) {
final FilePackage fp = FilePackage.getInstance();
fp.setName(Encoding.htmlDecode(title.trim()));
fp.setName(Encoding.htmlDecode(title).trim());
fp.setAllowMerge(true);
fp.setAllowInheritance(true);
fp.addLinks(ret);