mirror of
https://github.com/mirror/jdownloader.git
synced 2024-11-27 05:50:51 +00:00
*Plugins: Fixes/Changes/Maintenance*
- FaceBookComGallery: fixed plugin returning links to external sources by mistake RE forum 96185 - DramaCoolVideo: added new domain asiancsh, updated offline detection RE forum 90307 - Ardmediathek: crawlWdrMediathekEmbedded: added detection of GEO blocked items RE forum 88448 - Gogoplay4Com: fixed package name handling RE forum 90129 *Plugins: RIP* - DramaCoolVideo: watchasian.pe, watchasian.vc git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@49503 ebf7c1c2-ba36-0410-9fe8-c592906822b4 Former-commit-id: 3ab43a44b0aa3b341ad4f7bc45e29857f5398435
This commit is contained in:
parent
41c920f61f
commit
e02dacd518
@ -837,6 +837,11 @@ public class Ardmediathek extends PluginForDecrypt {
|
||||
|
||||
private ArrayList<DownloadLink> crawlWdrMediathekEmbedded(final CryptedLink param, final String url) throws Exception {
|
||||
br.getPage(url);
|
||||
if (br.getHttpConnection().getResponseCode() == 403) {
|
||||
throw new DecrypterRetryException(RetryReason.GEO);
|
||||
} else if (br.getHttpConnection().getResponseCode() == 403) {
|
||||
throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
}
|
||||
final String json = br.getRegex("\\$mediaObject\\.jsonpHelper\\.storeAndPlay\\((\\{.*?\\})\\);").getMatch(0);
|
||||
if (json == null) {
|
||||
/* Assume that content is offline */
|
||||
|
@ -40,9 +40,8 @@ public class DramaCoolVideo extends PluginForDecrypt {
|
||||
public static List<String[]> getPluginDomains() {
|
||||
final List<String[]> ret = new ArrayList<String[]>();
|
||||
// each entry in List<String[]> will result in one PluginForDecrypt, Plugin.getHost() will return String[0]->main domain
|
||||
ret.add(new String[] { "dramacool.pa", "dramacool.cr", "dramacool.ch", "dramacool.bz", "dramacool.video", "dramacool.movie", "dramacool.so", "dramacool.link", "dramacool.vc", "dramacool.fo" });
|
||||
ret.add(new String[] { "watchasian.pe", "watchasian.vc" });
|
||||
ret.add(new String[] { "gogoanime3.net", "gogoanime3.co", "gogoanime.tel", "gogoanime.tv", "gogoanime.io", "gogoanime.vc", "gogoanime.sh", "gogoanime.gg", "gogoanime.run" });
|
||||
ret.add(new String[] { "asianc.sh", "dramacool.pa", "dramacool.cr", "dramacool.ch", "dramacool.bz", "dramacool.video", "dramacool.movie", "dramacool.so", "dramacool.link", "dramacool.vc", "dramacool.fo" });
|
||||
ret.add(new String[] { "gogoanime3.co", "gogoanime3.net", "gogoanime.tel", "gogoanime.tv", "gogoanime.io", "gogoanime.vc", "gogoanime.sh", "gogoanime.gg", "gogoanime.run" });
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -66,7 +65,7 @@ public class DramaCoolVideo extends PluginForDecrypt {
|
||||
public static String[] buildAnnotationUrls(final List<String[]> pluginDomains) {
|
||||
final List<String> ret = new ArrayList<String>();
|
||||
for (final String[] domains : pluginDomains) {
|
||||
ret.add("https?://(?:www\\d*\\.)?" + buildHostsPatternPart(domains) + "/[\\w\\-]+(\\.html)?");
|
||||
ret.add("https?://(?:www\\d*\\.)?" + buildHostsPatternPart(domains) + "/[\\w\\-]+");
|
||||
}
|
||||
return ret.toArray(new String[0]);
|
||||
}
|
||||
@ -91,7 +90,15 @@ public class DramaCoolVideo extends PluginForDecrypt {
|
||||
} else {
|
||||
br.getPage(param.getCryptedUrl());
|
||||
}
|
||||
if (br.getHttpConnection().getResponseCode() == 404) {
|
||||
if (br.getHttpConnection().getResponseCode() == 403) {
|
||||
throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
} else if (br.containsHTML("<title>403 Forbidden</title>")) {
|
||||
/* 403 forbidden response with response code 200 */
|
||||
throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
} else if (br.getHttpConnection().getResponseCode() == 404) {
|
||||
throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
} else if (br.containsHTML(">\\s*404 Not Found")) {
|
||||
/* 404 response with response code 200 */
|
||||
throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
}
|
||||
String title = br.getRegex("<title>(?:Watch\\s+)([^<]+)\\s+\\|[\\s\\w]+").getMatch(0);
|
||||
|
@ -112,6 +112,12 @@ public class FaceBookComGallery extends PluginForDecrypt {
|
||||
private URL_TYPE getUrlType(final String url) throws MalformedURLException {
|
||||
if (url == null) {
|
||||
return null;
|
||||
} else if (!this.canHandle(url)) {
|
||||
/*
|
||||
* Important check! Link cannot be handled by this plugin. Links from other websites could look like Facebook links e.g.
|
||||
* https://www.youtube.com/watch?v=XXXXXXyyyyyy
|
||||
*/
|
||||
return null;
|
||||
}
|
||||
if (getVideoidFromURL(url) != null) {
|
||||
return URL_TYPE.VIDEO_GENERIC;
|
||||
@ -417,6 +423,7 @@ public class FaceBookComGallery extends PluginForDecrypt {
|
||||
* It is really hard to find out why specific Facebook content is offline (permission issue or offline content) so this is a
|
||||
* last ditch effort.
|
||||
*/
|
||||
/* Look for any errors. */
|
||||
for (final Object parsedJson : parsedJsons) {
|
||||
final Map<String, Object> videoErrormap = (Map<String, Object>) websiteFindVideoErrorMap(parsedJson, null);
|
||||
if (videoErrormap != null) {
|
||||
@ -424,7 +431,7 @@ public class FaceBookComGallery extends PluginForDecrypt {
|
||||
throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
}
|
||||
}
|
||||
/* Last resort: Look for any URLs which look like single images or videos. */
|
||||
/* No errors found -> Last resort: Look for any URLs which look like links to other single images or videos. */
|
||||
final String[] allurls = HTMLParser.getHttpLinks(br.getRequest().getHtmlCode(), br.getURL());
|
||||
for (final String thisurl : allurls) {
|
||||
if (!thisurl.equals(br.getURL()) && getUrlType(thisurl) != null) {
|
||||
|
@ -171,13 +171,10 @@ public class Gogoplay4Com extends PluginForDecrypt {
|
||||
throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
|
||||
}
|
||||
final String titleFromQuery = query.get("title");
|
||||
String packageName;
|
||||
String packageName = null;
|
||||
if (titleFromQuery != null) {
|
||||
/* Use title in query as packagename */
|
||||
packageName = titleFromQuery;
|
||||
} else {
|
||||
/* Get packagename from HTML */
|
||||
packageName = br.getRegex("<title>([^<>\"]+)</title>").getMatch(0);
|
||||
}
|
||||
final FilePackage fp = FilePackage.getInstance();
|
||||
fp.setPackageKey("gogoplay4://" + id);
|
||||
@ -202,6 +199,13 @@ public class Gogoplay4Com extends PluginForDecrypt {
|
||||
}
|
||||
final String[] embedurls = br.getRegex("data-video=\"(https?://[^\"]+)").getColumn(0);
|
||||
if (embedurls != null && embedurls.length > 0) {
|
||||
if (packageName == null) {
|
||||
packageName = br.getRegex("<title>([^<]+)</title>").getMatch(0);
|
||||
if (packageName != null) {
|
||||
packageName = Encoding.htmlDecode(packageName).trim();
|
||||
fp.setName(packageName);
|
||||
}
|
||||
}
|
||||
for (final String embedurl : embedurls) {
|
||||
if (embedurl.equals(contenturl) || embedurl.contains("id=" + id)) {
|
||||
logger.info("Found origin again; skipping it: " + embedurl);
|
||||
@ -228,6 +232,13 @@ public class Gogoplay4Com extends PluginForDecrypt {
|
||||
if (br.getHttpConnection().getResponseCode() == 404) {
|
||||
throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
}
|
||||
if (packageName == null) {
|
||||
packageName = br.getRegex("<title>([^<]+)</title>").getMatch(0);
|
||||
if (packageName != null) {
|
||||
packageName = Encoding.htmlDecode(packageName).trim();
|
||||
fp.setName(packageName);
|
||||
}
|
||||
}
|
||||
/* 0-2 captchas are required */
|
||||
if (AbstractRecaptchaV2.containsRecaptchaV2Class(br) || (br.containsHTML("grecaptcha\\.execute") && br.containsHTML("captcha_v3"))) {
|
||||
br.getHeaders().put("X-Requested-With", "XMLHttpRequest");
|
||||
|
Loading…
Reference in New Issue
Block a user