mirror of
https://github.com/mirror/jdownloader.git
synced 2024-11-27 05:50:51 +00:00
*Plugins: Fixes/Changes/Maintenance*
- JulesjordanCom: added detection of expired premium accounts *Plugins: New plugins* - [XFS] ztreamhubcom *Plugins: RIP* - DecrypterForRedirectServicesWithoutDirectRedirects: animeforce.org, sipkur.net git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@47989 ebf7c1c2-ba36-0410-9fe8-c592906822b4 Former-commit-id: 5bd9e38475635706c036246f376a44180d338cef
This commit is contained in:
parent
2a52349841
commit
464ce9f501
@ -33,8 +33,8 @@ import jd.plugins.DecrypterPlugin;
|
||||
import jd.plugins.DownloadLink;
|
||||
import jd.plugins.components.SiteType.SiteTemplate;
|
||||
|
||||
@DecrypterPlugin(revision = "$Revision$", interfaceVersion = 3, names = { "animeforce.org", "sipkur.net", "otrkeyfinder.com", "is.gd", "djurl.com", "q32.ru", "adfoc.us", "lnk.co", "myurl.in", "href.hu", "songspk.info", "academicearth.org", "tm-exchange.com", "mafia.to" }, urls = { "http://(?:www\\.)?animeforce\\.org/ds(?:\\d+)?\\.php\\?file=.+", "http://sipkur\\.net/[a-z0-9\\-_]+\\.html", "https?://otrkeyfinder\\.com/de/go\\-to\\-mirror\\?otrkey=.+", "https?://(?:www\\.)?is\\.gd/[a-zA-Z0-9]+", "http://djurl\\.com/[A-Za-z0-9]+", "http://q32\\.ru/\\d+/c/[A-Za-z0-9\\-_]+", "http://(www\\.)?adfoc\\.us/(serve/\\?id=[a-z0-9]+|(?!serve|privacy|terms)[a-z0-9]+)", "http://(www\\.)?lnk\\.co/[A-Za-z0-9]+", "http://(www\\.)?protect\\.myurl\\.in/[A-Za-z0-9]+", "http://href\\.hu/x/[a-zA-Z0-9\\.]+",
|
||||
"http://[\\w\\.]*?(link\\.songs\\.pk/(popsong|song1|bhangra)\\.php\\?songid=|songspk\\.info/ghazals/download/ghazals\\.php\\?id=|link\\.songspk\\.help/\\S+/download\\.php\\?id=)[0-9]+", "http://[\\w\\.]*?academicearth\\.org/lectures/.{2,}", "http://[\\w\\.]*?tm-exchange\\.com/(get\\.aspx\\?action=trackgbx|\\?action=trackshow)\\&id=\\d+", "http://[\\w\\.]*?mafia\\.to/download-[a-z0-9]+\\.cfm" })
|
||||
@DecrypterPlugin(revision = "$Revision$", interfaceVersion = 3, names = { "otrkeyfinder.com", "is.gd", "djurl.com", "q32.ru", "adfoc.us", "lnk.co", "myurl.in", "href.hu", "songspk.info", "academicearth.org", "tm-exchange.com", "mafia.to" }, urls = { "https?://otrkeyfinder\\.com/de/go\\-to\\-mirror\\?otrkey=.+", "https?://(?:www\\.)?is\\.gd/[a-zA-Z0-9]+", "http://djurl\\.com/[A-Za-z0-9]+", "http://q32\\.ru/\\d+/c/[A-Za-z0-9\\-_]+", "http://(www\\.)?adfoc\\.us/(serve/\\?id=[a-z0-9]+|(?!serve|privacy|terms)[a-z0-9]+)", "http://(www\\.)?lnk\\.co/[A-Za-z0-9]+", "http://(www\\.)?protect\\.myurl\\.in/[A-Za-z0-9]+", "http://href\\.hu/x/[a-zA-Z0-9\\.]+", "http://[\\w\\.]*?(link\\.songs\\.pk/(popsong|song1|bhangra)\\.php\\?songid=|songspk\\.info/ghazals/download/ghazals\\.php\\?id=|link\\.songspk\\.help/\\S+/download\\.php\\?id=)[0-9]+",
|
||||
"http://[\\w\\.]*?academicearth\\.org/lectures/.{2,}", "http://[\\w\\.]*?tm-exchange\\.com/(get\\.aspx\\?action=trackgbx|\\?action=trackshow)\\&id=\\d+", "http://[\\w\\.]*?mafia\\.to/download-[a-z0-9]+\\.cfm" })
|
||||
public class DecrypterForRedirectServicesWithoutDirectRedirects extends antiDDoSForDecrypt {
|
||||
@Override
|
||||
public String[] siteSupportedNames() {
|
||||
@ -65,7 +65,7 @@ public class DecrypterForRedirectServicesWithoutDirectRedirects extends antiDDoS
|
||||
String finalfilename = null;
|
||||
/* Some links don't have to be accessed (here) */
|
||||
try {
|
||||
if (!new Regex(parameter, "tm-exchange\\.com/|is\\.gd/|animeforce\\.org/").matches()) {
|
||||
if (!new Regex(parameter, "tm-exchange\\.com/|is\\.gd/").matches()) {
|
||||
getPage(parameter);
|
||||
}
|
||||
if (parameter.contains("link.songs.pk/") || parameter.contains("songspk.info/ghazals/download/ghazals.php?id=") || parameter.contains("link.songspk.help/")) {
|
||||
@ -218,21 +218,6 @@ public class DecrypterForRedirectServicesWithoutDirectRedirects extends antiDDoS
|
||||
offline = true;
|
||||
}
|
||||
}
|
||||
} else if (parameter.contains("sipkur.net/")) {
|
||||
finallink = this.br.getRegex("onclick=\"window\\.open\\(\\'(http[^<>\"]*?)\\'").getMatch(0);
|
||||
} else if (parameter.contains("animeforce.org/")) {
|
||||
// use cloudflare
|
||||
getPage(parameter);
|
||||
if (br.getRedirectLocation() != null) {
|
||||
br.setFollowRedirects(true);
|
||||
getPage(br.getRedirectLocation());
|
||||
}
|
||||
finallink = br.getRegex("href=\"(http:[^<>\"]+/)?(http[^<>\"]*?)\" target=\"_blank\"\\s?>Download</a>").getMatch(1);
|
||||
if (finallink == null) {
|
||||
if (br.containsHTML(">Il file che stai provando a scaricare non esiste,<br>oppure deve essere ancora caricato<|>o semplicemente hai cliccato/digitato un link sbagliato\\s*<")) {
|
||||
return decryptedLinks;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (final SocketTimeoutException e) {
|
||||
logger.info("Link offline (timeout): " + parameter);
|
||||
|
@ -18,6 +18,15 @@ package jd.plugins.hoster;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.appwork.storage.config.annotations.AboutConfig;
|
||||
import org.appwork.storage.config.annotations.DefaultBooleanValue;
|
||||
import org.appwork.utils.StringUtils;
|
||||
import org.jdownloader.plugins.components.antiDDoSForHost;
|
||||
import org.jdownloader.plugins.config.Order;
|
||||
import org.jdownloader.plugins.config.PluginConfigInterface;
|
||||
import org.jdownloader.scripting.JavaScriptEngineFactory;
|
||||
import org.jdownloader.translate._JDT;
|
||||
|
||||
import jd.PluginWrapper;
|
||||
import jd.controlling.AccountController;
|
||||
import jd.http.Browser;
|
||||
@ -28,6 +37,7 @@ import jd.parser.Regex;
|
||||
import jd.plugins.Account;
|
||||
import jd.plugins.Account.AccountType;
|
||||
import jd.plugins.AccountInfo;
|
||||
import jd.plugins.AccountInvalidException;
|
||||
import jd.plugins.AccountRequiredException;
|
||||
import jd.plugins.DownloadLink;
|
||||
import jd.plugins.DownloadLink.AvailableStatus;
|
||||
@ -35,15 +45,7 @@ import jd.plugins.HostPlugin;
|
||||
import jd.plugins.LinkStatus;
|
||||
import jd.plugins.PluginException;
|
||||
import jd.plugins.PluginForHost;
|
||||
|
||||
import org.appwork.storage.config.annotations.AboutConfig;
|
||||
import org.appwork.storage.config.annotations.DefaultBooleanValue;
|
||||
import org.appwork.utils.StringUtils;
|
||||
import org.jdownloader.plugins.components.antiDDoSForHost;
|
||||
import org.jdownloader.plugins.config.Order;
|
||||
import org.jdownloader.plugins.config.PluginConfigInterface;
|
||||
import org.jdownloader.scripting.JavaScriptEngineFactory;
|
||||
import org.jdownloader.translate._JDT;
|
||||
import jd.plugins.decrypter.JulesjordanComDecrypter;
|
||||
|
||||
@HostPlugin(revision = "$Revision$", interfaceVersion = 3, names = { "julesjordan.com" }, urls = { "https?://dl\\d+\\.julesjordan\\.com/dl/.+|https?://(?:www\\.)?julesjordan\\.com/(?:trial|members)/(?:movies|scenes)/[^/]+\\.html" })
|
||||
public class JulesjordanCom extends antiDDoSForHost {
|
||||
@ -60,11 +62,10 @@ public class JulesjordanCom extends antiDDoSForHost {
|
||||
/* Connection stuff */
|
||||
private static final boolean FREE_RESUME = true;
|
||||
private static final int FREE_MAXCHUNKS = 0;
|
||||
private static final int FREE_MAXDOWNLOADS = 20;
|
||||
private static final int FREE_MAXDOWNLOADS = -1;
|
||||
private final boolean ACCOUNT_PREMIUM_RESUME = true;
|
||||
private final int ACCOUNT_PREMIUM_MAXCHUNKS = 0;
|
||||
private final int ACCOUNT_PREMIUM_MAXDOWNLOADS = 20;
|
||||
public static final String html_loggedin = "members/logout";
|
||||
private final int ACCOUNT_PREMIUM_MAXDOWNLOADS = -1;
|
||||
private String dllink = null;
|
||||
private boolean server_issues = false;
|
||||
|
||||
@ -73,7 +74,6 @@ public class JulesjordanCom extends antiDDoSForHost {
|
||||
return br;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public AvailableStatus requestFileInformation(final DownloadLink link) throws Exception {
|
||||
final Account account = AccountController.getInstance().getValidAccount(this);
|
||||
@ -87,7 +87,7 @@ public class JulesjordanCom extends antiDDoSForHost {
|
||||
if (isTrailerURL(link.getPluginPatternMatcher())) {
|
||||
/* Trailer download */
|
||||
getPage(getURLFree(link.getPluginPatternMatcher()));
|
||||
if (jd.plugins.decrypter.JulesjordanComDecrypter.isOffline(this.br)) {
|
||||
if (JulesjordanComDecrypter.isOffline(this.br)) {
|
||||
throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
}
|
||||
long width_max = 0;
|
||||
@ -152,10 +152,10 @@ public class JulesjordanCom extends antiDDoSForHost {
|
||||
}
|
||||
br.getPage(mainlink);
|
||||
/* Check if content has been removed in the meanwhile. */
|
||||
if (jd.plugins.decrypter.JulesjordanComDecrypter.isOffline(this.br)) {
|
||||
if (JulesjordanComDecrypter.isOffline(this.br)) {
|
||||
throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
}
|
||||
final HashMap<String, String> allQualities = jd.plugins.decrypter.JulesjordanComDecrypter.findAllQualities(this.br);
|
||||
final HashMap<String, String> allQualities = JulesjordanComDecrypter.findAllQualities(this.br);
|
||||
dllink = allQualities.get(quality);
|
||||
if (StringUtils.isEmpty(dllink)) {
|
||||
logger.warning("Failed to refresh directurl");
|
||||
@ -256,9 +256,9 @@ public class JulesjordanCom extends antiDDoSForHost {
|
||||
return;
|
||||
} else {
|
||||
br.getPage("https://www." + account.getHoster() + "/members/index.php");
|
||||
if (br.containsHTML(html_loggedin)) {
|
||||
if (isLoggedin(br)) {
|
||||
logger.info("Cookie login successful");
|
||||
account.saveCookies(br.getCookies(account.getHoster()), "");
|
||||
account.saveCookies(br.getCookies(br.getHost()), "");
|
||||
return;
|
||||
} else {
|
||||
logger.info("Cookie login failed");
|
||||
@ -271,10 +271,6 @@ public class JulesjordanCom extends antiDDoSForHost {
|
||||
br.getPage("https://www." + account.getHoster() + "/members/");
|
||||
br.setCookie(br.getHost(), "CookieScriptConsent", "{\"action\":\"accept\"}");
|
||||
String postdata = "rlm=My+Server&for=https%253a%252f%252fwww%252ejulesjordan%252ecom%252fmembers%252f&uid=" + Encoding.urlEncode(account.getUser()) + "&pwd=" + Encoding.urlEncode(account.getPass()) + "&rmb=y";
|
||||
final DownloadLink dlinkbefore = this.getDownloadLink();
|
||||
if (dlinkbefore == null) {
|
||||
this.setDownloadLink(new DownloadLink(this, "Account", account.getHoster(), "http://" + account.getHoster(), true));
|
||||
}
|
||||
final String code = this.getCaptchaCode("/img.cptcha", this.getDownloadLink());
|
||||
postdata += "&img=" + Encoding.urlEncode(code);
|
||||
br.getHeaders().put("Origin", "https://www.julesjordan.com");
|
||||
@ -295,17 +291,13 @@ public class JulesjordanCom extends antiDDoSForHost {
|
||||
// br.setCookies(newcookies);
|
||||
// }
|
||||
br.postPage("/auth.form", postdata);
|
||||
if (!br.containsHTML(html_loggedin)) {
|
||||
if ("de".equalsIgnoreCase(System.getProperty("user.language"))) {
|
||||
throw new PluginException(LinkStatus.ERROR_PREMIUM, "\r\nUngültiger Benutzername oder ungültiges Passwort!\r\nSchnellhilfe: \r\nDu bist dir sicher, dass dein eingegebener Benutzername und Passwort stimmen?\r\nFalls dein Passwort Sonderzeichen enthält, ändere es und versuche es erneut!", PluginException.VALUE_ID_PREMIUM_DISABLE);
|
||||
} else {
|
||||
throw new PluginException(LinkStatus.ERROR_PREMIUM, "\r\nInvalid username/password!\r\nQuick help:\r\nYou're sure that the username and password you entered are correct?\r\nIf your password contains special characters, change it (remove them) and try again!", PluginException.VALUE_ID_PREMIUM_DISABLE);
|
||||
}
|
||||
}
|
||||
account.saveCookies(br.getCookies(account.getHoster()), "");
|
||||
if (dlinkbefore != null) {
|
||||
this.setDownloadLink(dlinkbefore);
|
||||
if (br.getURL().matches("(?i).+/expired/?$")) {
|
||||
/* Login is valid but account is not premium anymore. */
|
||||
throw new AccountInvalidException("Account is expired");
|
||||
} else if (!isLoggedin(br)) {
|
||||
throw new AccountInvalidException();
|
||||
}
|
||||
account.saveCookies(br.getCookies(br.getHost()), "");
|
||||
} catch (final PluginException e) {
|
||||
account.clearCookies("");
|
||||
throw e;
|
||||
@ -313,6 +305,14 @@ public class JulesjordanCom extends antiDDoSForHost {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isLoggedin(final Browser br) {
|
||||
if (br.containsHTML("(?i)members/logout")) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AccountInfo fetchAccountInfo(final Account account) throws Exception {
|
||||
final AccountInfo ai = new AccountInfo();
|
||||
|
112
src/jd/plugins/hoster/ZtreamhubCom.java
Normal file
112
src/jd/plugins/hoster/ZtreamhubCom.java
Normal file
@ -0,0 +1,112 @@
|
||||
//jDownloader - Downloadmanager
|
||||
//Copyright (C) 2013 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 <http://www.gnu.org/licenses/>.
|
||||
package jd.plugins.hoster;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.jdownloader.plugins.components.XFileSharingProBasic;
|
||||
|
||||
import jd.PluginWrapper;
|
||||
import jd.plugins.Account;
|
||||
import jd.plugins.Account.AccountType;
|
||||
import jd.plugins.DownloadLink;
|
||||
import jd.plugins.HostPlugin;
|
||||
|
||||
@HostPlugin(revision = "$Revision$", interfaceVersion = 3, names = {}, urls = {})
|
||||
public class ZtreamhubCom extends XFileSharingProBasic {
|
||||
public ZtreamhubCom(final PluginWrapper wrapper) {
|
||||
super(wrapper);
|
||||
this.enablePremium(super.getPurchasePremiumURL());
|
||||
}
|
||||
|
||||
/**
|
||||
* DEV NOTES XfileSharingProBasic Version SEE SUPER-CLASS<br />
|
||||
* mods: See overridden functions<br />
|
||||
* limit-info:<br />
|
||||
* captchatype-info: 2023-07-14: null <br />
|
||||
* other:<br />
|
||||
*/
|
||||
public static List<String[]> getPluginDomains() {
|
||||
final List<String[]> ret = new ArrayList<String[]>();
|
||||
// each entry in List<String[]> will result in one PluginForHost, Plugin.getHost() will return String[0]->main domain
|
||||
ret.add(new String[] { "ztreamhub.com" });
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static String[] getAnnotationNames() {
|
||||
return buildAnnotationNames(getPluginDomains());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] siteSupportedNames() {
|
||||
return buildSupportedNames(getPluginDomains());
|
||||
}
|
||||
|
||||
public static String[] getAnnotationUrls() {
|
||||
return XFileSharingProBasic.buildAnnotationUrls(getPluginDomains());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isResumeable(final DownloadLink link, final Account account) {
|
||||
final AccountType type = account != null ? account.getType() : null;
|
||||
if (AccountType.FREE.equals(type)) {
|
||||
/* Free Account */
|
||||
return true;
|
||||
} else if (AccountType.PREMIUM.equals(type) || AccountType.LIFETIME.equals(type)) {
|
||||
/* Premium account */
|
||||
return true;
|
||||
} else {
|
||||
/* Free(anonymous) and unknown account type */
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxChunks(final Account account) {
|
||||
final AccountType type = account != null ? account.getType() : null;
|
||||
if (AccountType.FREE.equals(type)) {
|
||||
/* Free Account */
|
||||
return 0;
|
||||
} else if (AccountType.PREMIUM.equals(type) || AccountType.LIFETIME.equals(type)) {
|
||||
/* Premium account */
|
||||
return 0;
|
||||
} else {
|
||||
/* Free(anonymous) and unknown account type */
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxSimultaneousFreeAnonymousDownloads() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxSimultaneousFreeAccountDownloads() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxSimultanPremiumDownloadNum() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isVideohoster_enforce_video_filename() {
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user