mirror of
https://github.com/mirror/jdownloader.git
synced 2025-02-18 19:32:36 +00:00
-added https support for parellysavyclub fixes #5593 videos are only downloadable for registered users
-fixed zppy filenames if none available fixes #5579 -improved yourfreeporn errorhandling fixes #5581 -integrated worldstaruncut in the worldstarhiphop plugin (same content servers) and added a decrypter to decrypt external videos fixes #5585 -sharex.xpg.com.br: RIP fixes #5587 old links don't work on the new site -excluded invalid trilulilo links fixes #5586 git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@17938 ebf7c1c2-ba36-0410-9fe8-c592906822b4
This commit is contained in:
parent
ada7b2c653
commit
a8a7cf58ab
@ -837,4 +837,5 @@ jd/plugins/hoster/Hundred63PanCom.class
|
||||
jd/plugins/decrypter/XXXBlg.class
|
||||
jd/plugins/hoster/MadShareCom.class
|
||||
jd/plugins/hoster/ImageHostOrg.class
|
||||
jd/captcha/methods/lttbt
|
||||
jd/captcha/methods/lttbt
|
||||
jd/plugins/hoster/ShareXXpgComBr.class
|
@ -21,6 +21,7 @@ import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import jd.PluginWrapper;
|
||||
import jd.config.Property;
|
||||
import jd.controlling.ProgressController;
|
||||
import jd.http.Browser;
|
||||
import jd.nutils.encoding.Encoding;
|
||||
@ -35,22 +36,23 @@ import jd.plugins.PluginForDecrypt;
|
||||
|
||||
import org.appwork.utils.formatter.SizeFormatter;
|
||||
|
||||
@DecrypterPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "chomikuj.pl" }, urls = { "http://(www\\.)?chomikuj\\.pl/.+" }, flags = { 0 })
|
||||
@DecrypterPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "chomikuj.pl" }, urls = { "http://((www\\.)?chomikuj\\.pl/.+|chomikujpagedecrypt\\.pl/.*?,\\d+$)" }, flags = { 0 })
|
||||
public class ChoMikujPl extends PluginForDecrypt {
|
||||
|
||||
public ChoMikujPl(PluginWrapper wrapper) {
|
||||
super(wrapper);
|
||||
}
|
||||
|
||||
// private static final String PASSWORDWRONG = ">Nieprawidłowe hasło<";
|
||||
private static final String PASSWORDTEXT = "Ten folder jest (<b>)?zabezpieczony oddzielnym hasłem";
|
||||
private String FOLDERPASSWORD = null;
|
||||
private ArrayList<Integer> REGEXSORT = new ArrayList<Integer>();
|
||||
private String ERROR = null;
|
||||
private String REQUESTVERIFICATIONTOKEN = null;
|
||||
private static final String PAGEDECRYPTLINK = "http://chomikujpagedecrypt\\.pl/.*?\\d+";
|
||||
|
||||
public ArrayList<DownloadLink> decryptIt(CryptedLink param, ProgressController progress) throws Exception {
|
||||
ArrayList<DownloadLink> decryptedLinks = new ArrayList<DownloadLink>();
|
||||
String parameter = param.toString();
|
||||
String parameter = param.toString().replace("chomikujpagedecrypt.pl/", "chomikuj.pl/");
|
||||
String problem = null;
|
||||
try {
|
||||
problem = parameter.substring(parameter.lastIndexOf(","));
|
||||
@ -61,13 +63,6 @@ public class ChoMikujPl extends PluginForDecrypt {
|
||||
// The message used on errors in this plugin
|
||||
ERROR = "Error while decrypting link: " + parameter;
|
||||
br.setFollowRedirects(false);
|
||||
br.getPage(parameter);
|
||||
// If we have a new link we have to use it or we'll have big problems
|
||||
// later when POSTing things to the server
|
||||
if (br.getRedirectLocation() != null) {
|
||||
parameter = br.getRedirectLocation();
|
||||
br.getPage(br.getRedirectLocation());
|
||||
}
|
||||
// Check if the link directly wants to access a specified page of the
|
||||
// gallery, if so remove it to avoid problems
|
||||
String checkPage = new Regex(parameter, "chomikuj\\.pl/.*?(,\\d+)$").getMatch(0);
|
||||
@ -79,6 +74,13 @@ public class ChoMikujPl extends PluginForDecrypt {
|
||||
br.getPage(parameter);
|
||||
}
|
||||
}
|
||||
br.getPage(parameter);
|
||||
// If we have a new link we have to use it or we'll have big problems
|
||||
// later when POSTing things to the server
|
||||
if (br.getRedirectLocation() != null) {
|
||||
parameter = br.getRedirectLocation();
|
||||
br.getPage(br.getRedirectLocation());
|
||||
}
|
||||
String fpName = br.getRegex("<title>(.*?) \\- .*? \\- Chomikuj\\.pl.*?</title>").getMatch(0);
|
||||
if (fpName == null) {
|
||||
fpName = br.getRegex("class=\"T_selected\">(.*?)</span>").getMatch(0);
|
||||
@ -106,34 +108,40 @@ public class ChoMikujPl extends PluginForDecrypt {
|
||||
fpName = fpName.trim();
|
||||
// Alle Haupt-POSTdaten
|
||||
String postdata = "chomikId=" + chomikID + "&folderId=" + folderID + "&__RequestVerificationToken=" + Encoding.urlEncode(REQUESTVERIFICATIONTOKEN);
|
||||
decryptedLinks = decryptAll(parameter, postdata, param);
|
||||
FilePackage fp = FilePackage.getInstance();
|
||||
final FilePackage fp = FilePackage.getInstance();
|
||||
fp.setName(fpName);
|
||||
fp.addLinks(decryptedLinks);
|
||||
decryptedLinks = decryptAll(parameter, postdata, param, fp);
|
||||
return decryptedLinks;
|
||||
}
|
||||
|
||||
private ArrayList<DownloadLink> decryptAll(final String parameter, final String postdata, final CryptedLink param) throws Exception {
|
||||
private ArrayList<DownloadLink> decryptAll(final String parameter, final String postdata, final CryptedLink param, final FilePackage fp) throws Exception {
|
||||
ArrayList<DownloadLink> decryptedLinks = new ArrayList<DownloadLink>();
|
||||
String savePost = null;
|
||||
String savePost = postdata;
|
||||
String saveLink = null;
|
||||
String password = null;
|
||||
|
||||
// Password handling
|
||||
if (br.containsHTML(PASSWORDTEXT)) {
|
||||
prepareBrowser(parameter, br);
|
||||
Form pass = br.getFormbyProperty("id", "LoginToFolder");
|
||||
final Form pass = br.getFormbyProperty("id", "LoginToFolder");
|
||||
if (pass == null) {
|
||||
logger.warning(ERROR + " :: Can't find Password Form!");
|
||||
return null;
|
||||
}
|
||||
for (int i = 0; i <= 3; i++) {
|
||||
password = getUserInput(null, param);
|
||||
pass.put("Password", password);
|
||||
FOLDERPASSWORD = param.getStringProperty("password");
|
||||
if (FOLDERPASSWORD == null) {
|
||||
FOLDERPASSWORD = getUserInput(null, param);
|
||||
}
|
||||
pass.put("Password", FOLDERPASSWORD);
|
||||
br.submitForm(pass);
|
||||
if (br.containsHTML("\\{\"IsSuccess\":true"))
|
||||
if (br.containsHTML("\\{\"IsSuccess\":true")) {
|
||||
break;
|
||||
else
|
||||
} else {
|
||||
// Maybe password was saved before but has changed in the
|
||||
// meantime!
|
||||
param.setProperty("password", Property.NULL);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (!br.containsHTML("\\{\"IsSuccess\":true")) {
|
||||
logger.warning("Wrong password!");
|
||||
@ -142,21 +150,49 @@ public class ChoMikujPl extends PluginForDecrypt {
|
||||
saveLink = parameter;
|
||||
}
|
||||
logger.info("Looking how many pages we got here for link " + parameter + " ...");
|
||||
|
||||
// Herausfinden wie viele Seiten der Link hat
|
||||
int pageCount = getPageCount(parameter);
|
||||
int pageCount = 1;
|
||||
if (param.toString().matches(PAGEDECRYPTLINK)) {
|
||||
pageCount = Integer.parseInt(new Regex(param.toString(), ",(\\d+)$").getMatch(0));
|
||||
} else {
|
||||
pageCount = getPageCount(parameter);
|
||||
}
|
||||
if (pageCount == -1) {
|
||||
logger.warning("Error, couldn't successfully find the number of pages for link: " + parameter);
|
||||
return null;
|
||||
} else if (pageCount == 0) pageCount = 1;
|
||||
logger.info("Found " + pageCount + " pages. Starting to decrypt them now.");
|
||||
final String linkPart = new Regex(parameter, "chomikuj\\.pl(/.+)").getMatch(0);
|
||||
/** Decrypt all pages, start with 1 (not 0 as it was before) */
|
||||
for (int i = 1; i <= pageCount; ++i) {
|
||||
logger.info("Decrypting page " + i + " of link: " + parameter);
|
||||
|
||||
// More than one page? Every page goes back into the decrypter as a
|
||||
// single link!
|
||||
if (pageCount > 1 && !param.toString().matches(PAGEDECRYPTLINK)) {
|
||||
logger.info("Found " + pageCount + " pages. Adding those for the decryption now.");
|
||||
for (int i = 1; i <= pageCount; i++) {
|
||||
final DownloadLink dl = createDownloadlink(parameter.replace("chomikuj.pl/", "chomikujpagedecrypt.pl/") + "," + i);
|
||||
dl.setProperty("reallink", parameter);
|
||||
fp.add(dl);
|
||||
try {
|
||||
distribute(dl);
|
||||
} catch (final Throwable e) {
|
||||
/* does not exist in 09581 */
|
||||
}
|
||||
decryptedLinks.add(dl);
|
||||
}
|
||||
} else {
|
||||
final String linkPart = new Regex(parameter, "chomikuj\\.pl(/.+)").getMatch(0);
|
||||
/** Decrypt all pages, start with 1 (not 0 as it was before) */
|
||||
// try {
|
||||
// if (isAbort()) {
|
||||
// logger.info("Chomikuj decryption aborted");
|
||||
// break;
|
||||
// }
|
||||
// } catch (final Throwable e) {
|
||||
// }
|
||||
logger.info("Decrypting page " + pageCount + " of link: " + parameter);
|
||||
final Browser tempBr = new Browser();
|
||||
prepareBrowser(parameter, tempBr);
|
||||
accessPage(postdata, tempBr, i);
|
||||
// Every full page has 30 links (pictures)
|
||||
accessPage(postdata, tempBr, pageCount);
|
||||
// Every full page has 30 links
|
||||
/** For photos */
|
||||
String[][] fileIds = tempBr.getRegex("<div class=\"left\">[\t\n\r ]+<p class=\"filename\">[\t\n\r ]+<a class=\"downloadAction\" href=\"[^<>\"\\']+\"> +<span class=\"bold\">(.{1,300})</span>(\\..{1,20})</a>[\t\n\r ]+</p>[\t\n\r ]+<div class=\"thumbnail\">.*?title=\"([^<>\"]*?)\".*?</div>[\t\n\r ]+<div class=\"smallTab\">[\t\n\r ]+<ul class=\"tabGradientBg borderRadius\">[\t\n\r ]+<li>([^<>\"\\'/]+)</li>.*?class=\"galeryActionButtons visibleOpt fileIdContainer\" rel=\"(\\d+)\"").getMatches();
|
||||
addRegexInt(0, 1, 3, 4, 2);
|
||||
@ -164,7 +200,9 @@ public class ChoMikujPl extends PluginForDecrypt {
|
||||
/** Specified for videos */
|
||||
fileIds = tempBr.getRegex("<ul class=\"borderRadius tabGradientBg\">[\t\n\r ]+<li><span>([^<>\"\\']+)</span></li>[\t\n\r ]+<li><span class=\"date\">[^<>\"\\']+</span></li>[\t\n\r ]+</ul>[\t\n\r ]+</div>[\t\n\r ]+<div class=\"fileActionsButtons clear visibleButtons fileIdContainer\" rel=\"(\\d+)\" style=\"visibility: hidden;\">.*?class=\"expanderHeader downloadAction\" href=\"[^<>\"\\']+\" title=\"[^<>\"\\']+\">[\t\n\r ]+<span class=\"bold\">([^<>\"\\']+)</span>([^<>\"\\']+)</a>[\t\n\r ]+<img alt=\"pobierz\" class=\"downloadArrow visibleArrow\" src=\"").getMatches();
|
||||
addRegexInt(2, 3, 0, 1, 0);
|
||||
/** Last attempt, only get IDs (no pre-available-check possible) */
|
||||
/**
|
||||
* Last attempt, only get IDs (no pre-available-check possible)
|
||||
*/
|
||||
if (fileIds == null || fileIds.length == 0) {
|
||||
fileIds = tempBr.getRegex("fileIdContainer\" rel=\"(\\d+)\"").getMatches();
|
||||
}
|
||||
@ -179,25 +217,19 @@ public class ChoMikujPl extends PluginForDecrypt {
|
||||
logger.info("The following link is offline: " + parameter);
|
||||
return decryptedLinks;
|
||||
}
|
||||
// If the last page only contains a file or fileS the regex's
|
||||
// don't work but the decrypter isn't broken so the user should
|
||||
// get the links!
|
||||
if (tempBr.containsHTML("\\.zip")) {
|
||||
logger.info("Stopping at page " + i + " because there were no pictures found on the page but i did find a .zip file!");
|
||||
return decryptedLinks;
|
||||
}
|
||||
logger.warning(ERROR);
|
||||
return null;
|
||||
}
|
||||
if (fileIds != null && fileIds.length != 0) {
|
||||
for (String[] id : fileIds) {
|
||||
String finalLink = String.format("&id=%s&gallerylink=%s&", id[REGEXSORT.get(3)], param.toString().replace("chomikuj.pl", "60423fhrzisweguikipo9re"));
|
||||
DownloadLink dl = createDownloadlink(finalLink);
|
||||
final DownloadLink dl = createDownloadlink(parameter.replace("chomikuj.pl/", "chomikujdecrypted.pl/") + "," + System.currentTimeMillis() + new Random().nextInt(100000));
|
||||
dl.setProperty("fileid", id[REGEXSORT.get(3)]);
|
||||
if (id.length > 1) {
|
||||
if (id.length == 5) {
|
||||
dl.setName(Encoding.htmlDecode(id[REGEXSORT.get(4)].trim()));
|
||||
} else {
|
||||
dl.setName(Encoding.htmlDecode(id[REGEXSORT.get(0)].trim()) + id[REGEXSORT.get(1)].trim());
|
||||
|
||||
}
|
||||
dl.setDownloadSize(SizeFormatter.getSize(id[REGEXSORT.get(2)].replace(",", ".")));
|
||||
dl.setAvailable(true);
|
||||
@ -209,13 +241,19 @@ public class ChoMikujPl extends PluginForDecrypt {
|
||||
} else {
|
||||
dl.setName(String.valueOf(new Random().nextInt(1000000)));
|
||||
}
|
||||
if (saveLink != null && savePost != null && password != null) {
|
||||
if (saveLink != null && savePost != null && FOLDERPASSWORD != null) {
|
||||
dl.setProperty("savedlink", saveLink);
|
||||
dl.setProperty("savedpost", savePost);
|
||||
// Not needed yet but might me useful in the future
|
||||
dl.setProperty("password", password);
|
||||
dl.setProperty("password", FOLDERPASSWORD);
|
||||
}
|
||||
dl.setProperty("requestverificationtoken", REQUESTVERIFICATIONTOKEN);
|
||||
fp.add(dl);
|
||||
try {
|
||||
distribute(dl);
|
||||
} catch (final Throwable e) {
|
||||
/* does not exist in 09581 */
|
||||
}
|
||||
decryptedLinks.add(dl);
|
||||
}
|
||||
}
|
||||
@ -224,13 +262,19 @@ public class ChoMikujPl extends PluginForDecrypt {
|
||||
String folderLink = folder[0];
|
||||
folderLink = "http://chomikuj.pl" + folderLink;
|
||||
if (folderLink.contains(linkPart) && !folderLink.equals(parameter)) {
|
||||
decryptedLinks.add(createDownloadlink(folderLink));
|
||||
final DownloadLink dl = createDownloadlink(folderLink);
|
||||
fp.add(dl);
|
||||
try {
|
||||
distribute(dl);
|
||||
} catch (final Throwable e) {
|
||||
/* does not exist in 09581 */
|
||||
}
|
||||
decryptedLinks.add(dl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return decryptedLinks;
|
||||
|
||||
}
|
||||
|
||||
private void addRegexInt(int filename, int filenameExt, int filesize, int fileid, int fullfilename) {
|
||||
|
53
src/jd/plugins/decrypter/WorldStarHipHopComDecrypter.java
Normal file
53
src/jd/plugins/decrypter/WorldStarHipHopComDecrypter.java
Normal file
@ -0,0 +1,53 @@
|
||||
//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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
package jd.plugins.decrypter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import jd.PluginWrapper;
|
||||
import jd.controlling.ProgressController;
|
||||
import jd.nutils.encoding.Encoding;
|
||||
import jd.plugins.CryptedLink;
|
||||
import jd.plugins.DecrypterPlugin;
|
||||
import jd.plugins.DownloadLink;
|
||||
import jd.plugins.PluginForDecrypt;
|
||||
|
||||
//Finds and decrypts embedded videos from worldstarhiphop.com
|
||||
@DecrypterPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "worldstarhiphop.com" }, urls = { "http://(www\\.)?worldstarhiphop\\.com/videos/video(\\d+)?.php\\?v=[a-zA-Z0-9]+" }, flags = { 0 })
|
||||
public class WorldStarHipHopComDecrypter extends PluginForDecrypt {
|
||||
|
||||
public WorldStarHipHopComDecrypter(PluginWrapper wrapper) {
|
||||
super(wrapper);
|
||||
}
|
||||
|
||||
public ArrayList<DownloadLink> decryptIt(CryptedLink param, ProgressController progress) throws Exception {
|
||||
ArrayList<DownloadLink> decryptedLinks = new ArrayList<DownloadLink>();
|
||||
String parameter = param.toString();
|
||||
br.setFollowRedirects(true);
|
||||
br.getPage(parameter);
|
||||
String externID = br.getRegex("\"file\",\"(http://(www\\.)?youtube\\.com/v/[^<>\"]*?)\"\\);").getMatch(0);
|
||||
if (externID != null) {
|
||||
decryptedLinks.add(createDownloadlink(Encoding.htmlDecode(externID.trim())));
|
||||
return decryptedLinks;
|
||||
}
|
||||
// Probably no external video, pass it over to the hoster plugin
|
||||
final DownloadLink dl = createDownloadlink(parameter.replace("worldstarhiphop.com/", "worldstarhiphopdecrypted.com/"));
|
||||
decryptedLinks.add(dl);
|
||||
return decryptedLinks;
|
||||
}
|
||||
|
||||
}
|
@ -28,7 +28,6 @@ import jd.http.Cookie;
|
||||
import jd.http.Cookies;
|
||||
import jd.http.URLConnectionAdapter;
|
||||
import jd.nutils.encoding.Encoding;
|
||||
import jd.parser.Regex;
|
||||
import jd.plugins.Account;
|
||||
import jd.plugins.AccountInfo;
|
||||
import jd.plugins.DownloadLink;
|
||||
@ -40,7 +39,7 @@ import jd.plugins.PluginForHost;
|
||||
import jd.utils.locale.JDL;
|
||||
|
||||
//This plugin gets all its links from a decrypter!
|
||||
@HostPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "chomikuj.pl" }, urls = { "\\&id=.*?\\&gallerylink=.*?60423fhrzisweguikipo9re.*?\\&" }, flags = { 2 })
|
||||
@HostPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "chomikuj.pl" }, urls = { "http://chomikujdecrypted\\.pl/.*?,\\d+$" }, flags = { 2 })
|
||||
public class ChoMikujPl extends PluginForHost {
|
||||
|
||||
private String DLLINK = null;
|
||||
@ -49,7 +48,7 @@ public class ChoMikujPl extends PluginForHost {
|
||||
|
||||
private static final String PREMIUMONLYUSERTEXT = "Download is only available for registered/premium users!";
|
||||
private static final String MAINPAGE = "http://chomikuj.pl/";
|
||||
private static final String FILEIDREGEX = "\\&id=(.*?)\\&";
|
||||
// private static final String FILEIDREGEX = "\\&id=(.*?)\\&";
|
||||
private boolean videolink = false;
|
||||
private static final Object LOCK = new Object();
|
||||
|
||||
@ -59,7 +58,42 @@ public class ChoMikujPl extends PluginForHost {
|
||||
}
|
||||
|
||||
public void correctDownloadLink(DownloadLink link) {
|
||||
link.setUrlDownload(link.getDownloadURL().replace("60423fhrzisweguikipo9re", "chomikuj.pl"));
|
||||
link.setUrlDownload(link.getDownloadURL().replace("chomikujdecrypted.pl/", "chomikuj.pl/"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public AvailableStatus requestFileInformation(DownloadLink link) throws IOException, PluginException {
|
||||
this.setBrowserExclusive();
|
||||
if (!getDllink(link, br.cloneBrowser())) {
|
||||
link.getLinkStatus().setStatusText(JDL.L("plugins.hoster.chomikujpl.only4registered", PREMIUMONLYUSERTEXT));
|
||||
return AvailableStatus.TRUE;
|
||||
}
|
||||
if (br.containsHTML("Najprawdopodobniej plik został w miedzyczasie usunięty z konta")) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
if (br.containsHTML(PREMIUMONLY)) {
|
||||
link.getLinkStatus().setStatusText(JDL.L("plugins.hoster.chomikujpl.only4registered", PREMIUMONLYUSERTEXT));
|
||||
return AvailableStatus.TRUE;
|
||||
}
|
||||
if (DLLINK == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
|
||||
// In case the link redirects to the finallink
|
||||
br.setFollowRedirects(true);
|
||||
URLConnectionAdapter con = null;
|
||||
try {
|
||||
con = br.openGetConnection(DLLINK);
|
||||
if (!con.getContentType().contains("html")) {
|
||||
link.setDownloadSize(con.getLongContentLength());
|
||||
// Only set final filename if it wasn't set before as video and
|
||||
// audio streams can have bad filenames
|
||||
if (link.getFinalFileName() == null) link.setFinalFileName(Encoding.htmlDecode(getFileNameFromHeader(con)));
|
||||
} else {
|
||||
throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
}
|
||||
return AvailableStatus.TRUE;
|
||||
} finally {
|
||||
try {
|
||||
con.disconnect();
|
||||
} catch (Throwable e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -85,7 +119,7 @@ public class ChoMikujPl extends PluginForHost {
|
||||
public boolean getDllink(DownloadLink theLink, Browser br) throws NumberFormatException, PluginException, IOException {
|
||||
final boolean redirectsSetting = br.isFollowingRedirects();
|
||||
br.setFollowRedirects(false);
|
||||
final String fid = new Regex(theLink.getDownloadURL(), FILEIDREGEX).getMatch(0);
|
||||
final String fid = theLink.getStringProperty("fileid");
|
||||
// Set by the decrypter if the link is password protected
|
||||
String savedLink = theLink.getStringProperty("savedlink");
|
||||
String savedPost = theLink.getStringProperty("savedpost");
|
||||
@ -94,10 +128,10 @@ public class ChoMikujPl extends PluginForHost {
|
||||
if (theLink.getStringProperty("video") != null) {
|
||||
br.setFollowRedirects(true);
|
||||
videolink = true;
|
||||
br.getPage("http://chomikuj.pl/ShowVideo.aspx?id=" + new Regex(theLink.getDownloadURL(), FILEIDREGEX).getMatch(0));
|
||||
br.getPage("http://chomikuj.pl/ShowVideo.aspx?id=" + fid);
|
||||
if (br.getURL().contains("chomikuj.pl/Error404.aspx") || br.containsHTML("(Nie znaleziono|Strona, której szukasz nie została odnaleziona w portalu\\.<|>Sprawdź czy na pewno posługujesz się dobrym adresem)")) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
br.setFollowRedirects(false);
|
||||
br.getPage("http://chomikuj.pl/Video.ashx?id=" + new Regex(theLink.getDownloadURL(), FILEIDREGEX).getMatch(0) + "&type=1&ts=" + new Random().nextInt(1000000000) + "&file=video&start=0");
|
||||
br.getPage("http://chomikuj.pl/Video.ashx?id=" + fid + "&type=1&ts=" + new Random().nextInt(1000000000) + "&file=video&start=0");
|
||||
DLLINK = br.getRedirectLocation();
|
||||
theLink.setFinalFileName(theLink.getName());
|
||||
} else if (theLink.getName().endsWith(".mp3") || theLink.getName().endsWith(".MP3")) {
|
||||
@ -143,7 +177,7 @@ public class ChoMikujPl extends PluginForHost {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlePremium(DownloadLink link, Account account) throws Exception {
|
||||
public void handlePremium(final DownloadLink link, final Account account) throws Exception {
|
||||
requestFileInformation(link);
|
||||
login(account, false);
|
||||
br.setFollowRedirects(false);
|
||||
@ -158,7 +192,7 @@ public class ChoMikujPl extends PluginForHost {
|
||||
// For some files they ask
|
||||
// "Do you really want to download this file", so we have to confirm
|
||||
// it with "YES" here ;)
|
||||
br.postPage("http://chomikuj.pl/action/License/acceptLargeTransfer?fileId=" + new Regex(link.getDownloadURL(), FILEIDREGEX).getMatch(0), "orgFile=" + Encoding.urlEncode(argh1) + "&userSelection=" + Encoding.urlEncode(argh2) + "&__RequestVerificationToken=" + Encoding.urlEncode(link.getStringProperty("requestverificationtoken")));
|
||||
br.postPage("http://chomikuj.pl/action/License/acceptLargeTransfer?fileId=" + link.getStringProperty("fileid"), "orgFile=" + Encoding.urlEncode(argh1) + "&userSelection=" + Encoding.urlEncode(argh2) + "&__RequestVerificationToken=" + Encoding.urlEncode(link.getStringProperty("requestverificationtoken")));
|
||||
DLLINK = br.getRegex("redirectUrl\":\"(http://.*?)\"").getMatch(0);
|
||||
if (DLLINK == null) DLLINK = br.getRegex("\\\\u003ca href=\\\\\"(.*?)\\\\\"").getMatch(0);
|
||||
if (DLLINK != null) DLLINK = Encoding.htmlDecode(DLLINK);
|
||||
@ -219,41 +253,6 @@ public class ChoMikujPl extends PluginForHost {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AvailableStatus requestFileInformation(DownloadLink link) throws IOException, PluginException {
|
||||
this.setBrowserExclusive();
|
||||
if (!getDllink(link, br.cloneBrowser())) {
|
||||
link.getLinkStatus().setStatusText(JDL.L("plugins.hoster.chomikujpl.only4registered", PREMIUMONLYUSERTEXT));
|
||||
return AvailableStatus.TRUE;
|
||||
}
|
||||
if (br.containsHTML("Najprawdopodobniej plik został w miedzyczasie usunięty z konta")) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
if (br.containsHTML(PREMIUMONLY)) {
|
||||
link.getLinkStatus().setStatusText(JDL.L("plugins.hoster.chomikujpl.only4registered", PREMIUMONLYUSERTEXT));
|
||||
return AvailableStatus.TRUE;
|
||||
}
|
||||
if (DLLINK == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
|
||||
// In case the link redirects to the finallink
|
||||
br.setFollowRedirects(true);
|
||||
URLConnectionAdapter con = null;
|
||||
try {
|
||||
con = br.openGetConnection(DLLINK);
|
||||
if (!con.getContentType().contains("html")) {
|
||||
link.setDownloadSize(con.getLongContentLength());
|
||||
// Only set final filename if it wasn't set before as video and
|
||||
// audio streams can have bad filenames
|
||||
if (link.getFinalFileName() == null) link.setFinalFileName(Encoding.htmlDecode(getFileNameFromHeader(con)));
|
||||
} else {
|
||||
throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
}
|
||||
return AvailableStatus.TRUE;
|
||||
} finally {
|
||||
try {
|
||||
con.disconnect();
|
||||
} catch (Throwable e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset() {
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ import jd.plugins.PluginException;
|
||||
import jd.plugins.PluginForHost;
|
||||
import jd.utils.JDUtilities;
|
||||
|
||||
@HostPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "parellisavvyclub.com" }, urls = { "http://(www\\.)?parellisavvyclub\\.com/(watchMedia\\.faces\\?id=\\d+|video\\?sckey=[^\"\\']+(\\&pl=\\d+)?)" }, flags = { 2 })
|
||||
@HostPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "parellisavvyclub.com" }, urls = { "https?://(www\\.)?parellisavvyclub\\.com/(watchMedia\\.faces\\?id=\\d+|video\\?sckey=[^\"\\']+(\\&pl=\\d+)?)" }, flags = { 2 })
|
||||
public class ParelliSavvyClubCom extends PluginForHost {
|
||||
|
||||
private static final String MAINPAGE = "http://www.parellisavvyclub.com";
|
||||
@ -49,6 +49,10 @@ public class ParelliSavvyClubCom extends PluginForHost {
|
||||
this.enablePremium("http://shop.parellinaturalhorsetraining.com/savvySignupStep1.jsf");
|
||||
}
|
||||
|
||||
public void correctDownloadLink(DownloadLink link) {
|
||||
link.setUrlDownload(link.getDownloadURL().replace("https://", "http://"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public AccountInfo fetchAccountInfo(final Account account) throws Exception {
|
||||
final AccountInfo ai = new AccountInfo();
|
||||
|
@ -1,92 +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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
package jd.plugins.hoster;
|
||||
|
||||
import jd.PluginWrapper;
|
||||
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 = { "sharex.xpg.com.br" }, urls = { "http://(www\\.)?sharex\\.xpg\\.com\\.br/files/[0-9]+" }, flags = { 0 })
|
||||
public class ShareXXpgComBr extends PluginForHost {
|
||||
|
||||
public ShareXXpgComBr(PluginWrapper wrapper) {
|
||||
super(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAGBLink() {
|
||||
return "http://sharex.xpg.com.br/contact.php";
|
||||
}
|
||||
|
||||
@Override
|
||||
public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws Exception {
|
||||
this.setBrowserExclusive();
|
||||
br.setFollowRedirects(true);
|
||||
br.getPage(downloadLink.getDownloadURL());
|
||||
if (br.getURL().contains("/?NOT_FOUND")) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
String filename = br.getRegex("<div class=\"downinfo\">([^<>\"]*?)<").getMatch(0);
|
||||
if (filename == null) {
|
||||
filename = br.getRegex("/download/.*?/(.*?)\"").getMatch(0);
|
||||
}
|
||||
String filesize = br.getRegex(">([0-9]+ bytes)<").getMatch(0);
|
||||
if (filename == null) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
downloadLink.setName(filename.trim());
|
||||
if (filesize != null) downloadLink.setDownloadSize(SizeFormatter.getSize(filesize));
|
||||
return AvailableStatus.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleFree(DownloadLink link) throws Exception {
|
||||
this.setBrowserExclusive();
|
||||
requestFileInformation(link);
|
||||
String dllink = br.getRegex("<div class=\"downbut\"><a href=\"(http://[^<>\"]*?)\"").getMatch(0);
|
||||
if (dllink == null) dllink = br.getRegex("\"(http://sharex\\.xpg\\.com\\.br/download/[0-9]+/.*?)\"").getMatch(0);
|
||||
if (dllink == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
|
||||
dllink = dllink.replaceAll("\\{", "%7B");
|
||||
dllink = dllink.replaceAll("\\[", "%5B");
|
||||
dllink = dllink.replaceAll("\\]", "%5D");
|
||||
dllink = dllink.replaceAll("\\}", "%7D");
|
||||
dl = jd.plugins.BrowserAdapter.openDownload(br, link, dllink, true, 0);
|
||||
if ((dl.getConnection().getContentType().contains("html"))) {
|
||||
if (dl.getConnection().getResponseCode() == 503) throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE, "Server error", 60 * 60 * 1000l);
|
||||
br.followConnection();
|
||||
if (br.containsHTML(">404 Not Found<")) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
|
||||
}
|
||||
dl.startDownload();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxSimultanFreeDownloadNum() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetDownloadlink(DownloadLink link) {
|
||||
}
|
||||
|
||||
}
|
@ -45,25 +45,17 @@ import jd.plugins.PluginForHost;
|
||||
import jd.utils.JDHexUtils;
|
||||
import jd.utils.locale.JDL;
|
||||
|
||||
@HostPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "trilulilu.ro" }, urls = { "http://(www\\.)?trilulilu\\.ro/(?!video/)[A-Za-z0-9_\\-]+/[A-Za-z0-9_\\-]+" }, flags = { 2 })
|
||||
@HostPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "trilulilu.ro" }, urls = { "http://(www\\.)?trilulilu\\.ro/(?!video|canal|profil)[A-Za-z0-9_\\-]+/[A-Za-z0-9_\\-]+" }, flags = { 2 })
|
||||
public class TriLuLiLuRo extends PluginForHost {
|
||||
|
||||
private String DLLINK = null;
|
||||
|
||||
private static final Object LOCK = new Object();
|
||||
|
||||
private static final String VIDEOPLAYER = "<meta property=\"og:video\"";
|
||||
|
||||
private static final String LIMITREACHED = ">Ai atins limita de 5 ascultări de piese audio pe zi. Te rugăm să intri in cont ca să poţi";
|
||||
|
||||
private static final String COUNTRYBLOCK = "\t+Fişierul nu este disponibil pentru vizionare în ţara dumneavoastră";
|
||||
|
||||
private static final String COUNTRYBLOCKUSERTEXT = JDL.L("plugins.hoster.triluliluro.country", "This file is not downloadable in your country.");
|
||||
|
||||
private static final String ONLYFORREGISTEREDUSERS = "\t+Trebuie să.*?intri în cont</a> ca să poţi accesa acest fişier";
|
||||
|
||||
private static final String ONLYFORREGISTEREDUSERSTEXT = JDL.L("plugins.hoster.triluliluro.user", "This file is only downloadable for registered users!");
|
||||
|
||||
private String NONSTANDARDMD5 = null;
|
||||
|
||||
public TriLuLiLuRo(PluginWrapper wrapper) {
|
||||
@ -74,6 +66,40 @@ public class TriLuLiLuRo extends PluginForHost {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws IOException, PluginException {
|
||||
br.setFollowRedirects(true);
|
||||
br.getPage(downloadLink.getDownloadURL());
|
||||
if (br.containsHTML(COUNTRYBLOCK)) {
|
||||
try {
|
||||
localProxy(true);
|
||||
} catch (final Throwable e) {
|
||||
/* does not exist in 09581 */
|
||||
}
|
||||
br.getPage(downloadLink.getDownloadURL());
|
||||
}
|
||||
if (br.containsHTML("(Fişierul căutat nu există|Contul acestui utilizator a fost dezactivat)")) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
if (br.containsHTML(LIMITREACHED)) return AvailableStatus.TRUE;
|
||||
String filename = br.getRegex("<div class=\"file_description floatLeft\">[\r\t\n ]+<h1>(.*?)</h1>").getMatch(0);
|
||||
if (filename == null) {
|
||||
filename = br.getRegex("<meta name=\"title\" content=\"Trilulilu \\- (.*?) - Muzică Diverse\" />").getMatch(0);
|
||||
if (filename == null) {
|
||||
filename = br.getRegex("<title>Trilulilu \\- (.*?) - Muzică Diverse</title>").getMatch(0);
|
||||
if (filename == null) {
|
||||
filename = br.getRegex("<div class=\"music_demo\">[\n\t\r ]+<h3>(.*?)\\.mp3 \\(demo 30 de secunde\\)</h3").getMatch(0);
|
||||
if (filename == null) filename = br.getRegex("<div class=\"hentry\">[\t\n\r ]+<h1>(.*?)</h1>").getMatch(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (filename == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
|
||||
filename = Encoding.htmlDecode(filename.trim());
|
||||
if (br.containsHTML(VIDEOPLAYER))
|
||||
downloadLink.setFinalFileName(filename + ".mp4");
|
||||
else
|
||||
downloadLink.setFinalFileName(filename + ".mp3");
|
||||
return AvailableStatus.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AccountInfo fetchAccountInfo(final Account account) throws Exception {
|
||||
final AccountInfo ai = new AccountInfo();
|
||||
@ -178,40 +204,6 @@ public class TriLuLiLuRo extends PluginForHost {
|
||||
return result != null ? result.toString() : "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws IOException, PluginException {
|
||||
br.setFollowRedirects(true);
|
||||
br.getPage(downloadLink.getDownloadURL());
|
||||
if (br.containsHTML(COUNTRYBLOCK)) {
|
||||
try {
|
||||
localProxy(true);
|
||||
} catch (final Throwable e) {
|
||||
/* does not exist in 09581 */
|
||||
}
|
||||
br.getPage(downloadLink.getDownloadURL());
|
||||
}
|
||||
if (br.containsHTML("(Fişierul căutat nu există|Contul acestui utilizator a fost dezactivat)")) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
if (br.containsHTML(LIMITREACHED)) return AvailableStatus.TRUE;
|
||||
String filename = br.getRegex("<div class=\"file_description floatLeft\">[\r\t\n ]+<h1>(.*?)</h1>").getMatch(0);
|
||||
if (filename == null) {
|
||||
filename = br.getRegex("<meta name=\"title\" content=\"Trilulilu \\- (.*?) - Muzică Diverse\" />").getMatch(0);
|
||||
if (filename == null) {
|
||||
filename = br.getRegex("<title>Trilulilu \\- (.*?) - Muzică Diverse</title>").getMatch(0);
|
||||
if (filename == null) {
|
||||
filename = br.getRegex("<div class=\"music_demo\">[\n\t\r ]+<h3>(.*?)\\.mp3 \\(demo 30 de secunde\\)</h3").getMatch(0);
|
||||
if (filename == null) filename = br.getRegex("<div class=\"hentry\">[\t\n\r ]+<h1>(.*?)</h1>").getMatch(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (filename == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
|
||||
filename = Encoding.htmlDecode(filename.trim());
|
||||
if (br.containsHTML(VIDEOPLAYER))
|
||||
downloadLink.setFinalFileName(filename + ".mp4");
|
||||
else
|
||||
downloadLink.setFinalFileName(filename + ".mp3");
|
||||
return AvailableStatus.TRUE;
|
||||
}
|
||||
|
||||
private void getDownloadUrl(DownloadLink downloadLink) throws PluginException, IOException {
|
||||
Browser br2 = br.cloneBrowser();
|
||||
DLLINK = br.getRegex("<param name=\"flashvars\" value=\"song=(http.*?\\.mp3)").getMatch(0);
|
||||
@ -314,7 +306,8 @@ public class TriLuLiLuRo extends PluginForHost {
|
||||
value = value + r;
|
||||
}
|
||||
/*
|
||||
* Encoded as 64-bit double precision floating point number IEEE 754 standard
|
||||
* Encoded as 64-bit double precision floating point number
|
||||
* IEEE 754 standard
|
||||
*/
|
||||
value = value != null ? String.valueOf((int) Double.longBitsToDouble(new BigInteger(value, 16).longValue())) : value;
|
||||
} else {
|
||||
|
@ -28,7 +28,7 @@ import jd.plugins.LinkStatus;
|
||||
import jd.plugins.PluginException;
|
||||
import jd.plugins.PluginForHost;
|
||||
|
||||
@HostPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "worldstarhiphop.com" }, urls = { "http://[\\w\\.]*?worldstarhiphop\\.com/videos/video(\\d+)?.php\\?v=[a-zA-Z0-9]+" }, flags = { 0 })
|
||||
@HostPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "worldstarhiphop.com" }, urls = { "http://(www\\.)?worldstarhiphopdecrypted\\.com/videos/video(\\d+)?.php\\?v=[a-zA-Z0-9]+" }, flags = { 0 })
|
||||
public class WorldStarHipHopCom extends PluginForHost {
|
||||
|
||||
private String dllink = null;
|
||||
@ -47,45 +47,38 @@ public class WorldStarHipHopCom extends PluginForHost {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleFree(DownloadLink downloadLink) throws Exception {
|
||||
requestFileInformation(downloadLink);
|
||||
dl = jd.plugins.BrowserAdapter.openDownload(br, downloadLink, dllink, true, 0);
|
||||
if (dl.getConnection().getContentType().contains("html")) {
|
||||
br.followConnection();
|
||||
throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
|
||||
}
|
||||
dl.startDownload();
|
||||
public void correctDownloadLink(DownloadLink link) {
|
||||
link.setUrlDownload(link.getDownloadURL().replace("worldstarhiphopdecrypted.com/", "worldstarhiphop.com/"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws IOException, PluginException {
|
||||
this.setBrowserExclusive();
|
||||
br.setFollowRedirects(false);
|
||||
br.setCookie("http://worldstaruncut.com/", "worldstarAdultOk", "true");
|
||||
br.setFollowRedirects(true);
|
||||
br.getPage(downloadLink.getDownloadURL());
|
||||
if (br.getRedirectLocation() != null) {
|
||||
if (br.getRedirectLocation().contains("worldstaruncut.com/")) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
|
||||
}
|
||||
if (br.containsHTML("<title>Video: No Video </title>")) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
String filename = br.getRegex("<meta name=\"title\" content=\"(.*?)\"").getMatch(0);
|
||||
if (filename == null) {
|
||||
filename = br.getRegex("<title>Video: (.*?)</title>").getMatch(0);
|
||||
String filename = null;
|
||||
if (br.getURL().contains("worldstaruncut.com/")) {
|
||||
if (br.getURL().equals("http://www.worldstarhiphop.com/videos/")) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
getURLUniversal();
|
||||
filename = br.getRegex("<title>([^<>\"]*?)\\(\\*Warning\\*").getMatch(0);
|
||||
if (filename == null) filename = br.getRegex("<td width=\"607\" class=\"style4\">([^<>\"]*?) \\(\\*Warning\\*").getMatch(0);
|
||||
} else {
|
||||
if (br.containsHTML("<title>Video: No Video </title>")) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
|
||||
filename = br.getRegex("<meta name=\"title\" content=\"(.*?)\"").getMatch(0);
|
||||
if (filename == null) {
|
||||
filename = br.getRegex("<h1 style=\"width:438px;\">(.*?)</h1>").getMatch(0);
|
||||
if (filename == null) filename = br.getRegex("<span style=\"display:none;\">Watching: (.*?)</span><img src=\"").getMatch(0);
|
||||
filename = br.getRegex("<title>Video: (.*?)</title>").getMatch(0);
|
||||
if (filename == null) {
|
||||
filename = br.getRegex("<h1 style=\"width:438px;\">(.*?)</h1>").getMatch(0);
|
||||
if (filename == null) filename = br.getRegex("<span style=\"display:none;\">Watching: (.*?)</span><img src=\"").getMatch(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
dllink = br.getRegex("v=playFLV\\.php\\?loc=(http://.*?\\.(mp4|flv))\\&").getMatch(0);
|
||||
if (dllink == null) {
|
||||
dllink = br.getRegex("(http://hwcdn\\.net/[a-z0-9]+/cds/\\d+/\\d+/\\d+/.*?\\.(mp4|flv))").getMatch(0);
|
||||
dllink = br.getRegex("v=playFLV\\.php\\?loc=(http://.*?\\.(mp4|flv))\\&").getMatch(0);
|
||||
if (dllink == null) {
|
||||
dllink = br.getRegex("v=(http://.*?\\.com/.*?/vid/.*?\\.(mp4|flv))").getMatch(0);
|
||||
dllink = br.getRegex("(http://hwcdn\\.net/[a-z0-9]+/cds/\\d+/\\d+/\\d+/.*?\\.(mp4|flv))").getMatch(0);
|
||||
if (dllink == null) {
|
||||
dllink = br.getRegex("addVariable\\(\"file\",\"(http://.*?)\"").getMatch(0);
|
||||
if (dllink == null) {
|
||||
dllink = br.getRegex("\"(http://hw\\-videos\\.worldstarhiphop\\.com/u/vid/.*?)\"").getMatch(0);
|
||||
}
|
||||
dllink = br.getRegex("v=(http://.*?\\.com/.*?/vid/.*?\\.(mp4|flv))").getMatch(0);
|
||||
if (dllink == null) getURLUniversal();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -113,6 +106,24 @@ public class WorldStarHipHopCom extends PluginForHost {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleFree(DownloadLink downloadLink) throws Exception {
|
||||
requestFileInformation(downloadLink);
|
||||
dl = jd.plugins.BrowserAdapter.openDownload(br, downloadLink, dllink, true, 0);
|
||||
if (dl.getConnection().getContentType().contains("html")) {
|
||||
br.followConnection();
|
||||
throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
|
||||
}
|
||||
dl.startDownload();
|
||||
}
|
||||
|
||||
private void getURLUniversal() {
|
||||
dllink = br.getRegex("addVariable\\(\"file\",\"(http://.*?)\"").getMatch(0);
|
||||
if (dllink == null) {
|
||||
dllink = br.getRegex("\"(http://hw\\-videos\\.worldstarhiphop\\.com/u/vid/.*?)\"").getMatch(0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset() {
|
||||
}
|
||||
|
@ -49,26 +49,6 @@ public class YourFreePornUs extends PluginForHost {
|
||||
|
||||
private static final String VIDEOTHERE = "video\\-frame\"";
|
||||
|
||||
@Override
|
||||
public void handleFree(DownloadLink downloadLink) throws Exception {
|
||||
requestFileInformation(downloadLink);
|
||||
if (!br.containsHTML(VIDEOTHERE)) throw new PluginException(LinkStatus.ERROR_IP_BLOCKED, 60 * 60 * 1000l);
|
||||
br.getPage("http://www.yourfreeporn.us/media/player/config.php?vkey=" + new Regex(downloadLink.getDownloadURL(), "yourfreeporn\\.us/video/(\\d+)").getMatch(0));
|
||||
DLLINK = br.getRegex("<src>(http://.*?)</src>").getMatch(0);
|
||||
if (DLLINK == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
|
||||
DLLINK = Encoding.htmlDecode(DLLINK);
|
||||
String ext = DLLINK.substring(DLLINK.lastIndexOf("."));
|
||||
if (ext == null) ext = ".flv";
|
||||
downloadLink.setFinalFileName(downloadLink.getName() + ext);
|
||||
dl = jd.plugins.BrowserAdapter.openDownload(br, downloadLink, DLLINK, true, -3);
|
||||
if (dl.getConnection().getContentType().contains("html")) {
|
||||
br.followConnection();
|
||||
if (br.containsHTML(">403 \\- Forbidden<")) throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE, "Server error", 5 * 60 * 1000l);
|
||||
throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
|
||||
}
|
||||
dl.startDownload();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws IOException, PluginException {
|
||||
this.setBrowserExclusive();
|
||||
@ -91,6 +71,29 @@ public class YourFreePornUs extends PluginForHost {
|
||||
return AvailableStatus.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleFree(DownloadLink downloadLink) throws Exception {
|
||||
requestFileInformation(downloadLink);
|
||||
if (br.containsHTML("<div align=\"center\"><a href=\"/signup\"><img src=\"/img/common/signup\\.jpg\"")) throw new PluginException(LinkStatus.ERROR_FATAL, "Only downloadable for premium users");
|
||||
// Maybe not even needed anymore, seems like all videos are only for
|
||||
// premium
|
||||
if (!br.containsHTML(VIDEOTHERE)) throw new PluginException(LinkStatus.ERROR_IP_BLOCKED, 60 * 60 * 1000l);
|
||||
br.getPage("http://www.yourfreeporn.us/media/player/config.php?vkey=" + new Regex(downloadLink.getDownloadURL(), "yourfreeporn\\.us/video/(\\d+)").getMatch(0));
|
||||
DLLINK = br.getRegex("<src>(http://.*?)</src>").getMatch(0);
|
||||
if (DLLINK == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
|
||||
DLLINK = Encoding.htmlDecode(DLLINK);
|
||||
String ext = DLLINK.substring(DLLINK.lastIndexOf("."));
|
||||
if (ext == null) ext = ".flv";
|
||||
downloadLink.setFinalFileName(downloadLink.getName() + ext);
|
||||
dl = jd.plugins.BrowserAdapter.openDownload(br, downloadLink, DLLINK, true, -3);
|
||||
if (dl.getConnection().getContentType().contains("html")) {
|
||||
br.followConnection();
|
||||
if (br.containsHTML(">403 \\- Forbidden<")) throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE, "Server error", 5 * 60 * 1000l);
|
||||
throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
|
||||
}
|
||||
dl.startDownload();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset() {
|
||||
}
|
||||
|
@ -172,15 +172,15 @@ public class Zippysharecom extends PluginForHost {
|
||||
|
||||
String filename = br.getRegex(Pattern.compile("Name:(\\s+)?</font>(\\s+)?<font style=.*?>(.*?)</font>", Pattern.CASE_INSENSITIVE)).getMatch(2);
|
||||
if (filename == null) {
|
||||
filename = br.getRegex("<title>Zippyshare.com - (.*?)</title>").getMatch(0);
|
||||
filename = br.getRegex("<title>Zippyshare\\.com \\- (.*?)</title>").getMatch(0);
|
||||
}
|
||||
if (filename == null) {
|
||||
final String var = br.getRegex("var fulllink.*?'\\+(.*?)\\+'").getMatch(0);
|
||||
filename = br.getRegex("'\\+" + var + "\\+'/(.*?)';").getMatch(0);
|
||||
}
|
||||
if (filename.contains("/fileName?key=")) {
|
||||
final String url = br.getRegex("var fulllink = '(.*?)';").getMatch(-1);
|
||||
filename = new Regex(url, "'/(.*?)';").getMatch(0);
|
||||
final String url = br.getRegex("document\\.location = \\'(/d/[^<>\"]*?\\';)").getMatch(0);
|
||||
if (url != null) filename = new Regex(url, "d/\\d+/\\d+/([^<>\"]*?)\\';").getMatch(0);
|
||||
}
|
||||
if (filename == null) {
|
||||
filename = br.getRegex("\\+\"/(.*?)\";").getMatch(0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user