JD Community
 

Reply
 
Thread Tools Display Modes
  #1  
Old 13.12.2011, 18:24
fcpt's Avatar
fcpt fcpt is offline
DSL Light User
 
Join Date: Sep 2011
Posts: 34
Question multiupload.com Direct download

1st The decrypter at the SVN is not matching the multiupload.com direct download link.

2nd
Not releated to the 1st problem, because the direct download link changes over time, the directhttp plugin is not the right place to handle it.
In my opinion we should create a new hoster plugin that matches the link every time the download starts.
I attempted to make a hoster plugin, but only the decrypter is called.
When I think of it, the decrypter and hoster have the same urls regex, and match the same links.
Do I need to change the link in the decrypter, and match it changed in the hoster plugin?
Example of work:
decrypter: matches that there is a direct download link and create a new link to be picked by the hoster plugin, e.g.:
http://www.multiupload.com/9Y2RJX3T90 --> httpMltpldCm://www.multiupload.com/9Y2RJX3T90
hoster: matches the link httpMltpldCm://www.multiupload.com/9Y2RJX3T90 and deal with it.

Last edited by Jiaz; 08.01.2012 at 12:11.
Reply With Quote
  #2  
Old 13.12.2011, 18:29
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
The Porn Guy
 
Join Date: Mar 2009
Location: Deutschland
Posts: 35,925
Default

Quote:
Originally Posted by fcpt View Post
Do I need to change the link in the decrypter, and match it changed in the hoster plugin?
Yes this is what has to be done.
If you want us to do this, please post example links so i'll add a multiupload.com hosterplugin.

GreeZ pspzockerscene
__________________

Ad-free installers || Werbefreie Installer
<--Current Stable 0.9.581-->Windows Setup
Windows Setup<--JD2 BETA-->Linux Setup x86 || Linux Setup x64 || Mac Setup
-----=>Support Chat<=-----
Spoiler:

Haha nice one Jiaz
Quote:
Originally Posted by Jiaz View Post
netload free does not support free
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
  #3  
Old 13.12.2011, 20:41
fcpt's Avatar
fcpt fcpt is offline
DSL Light User
 
Join Date: Sep 2011
Posts: 34
Default

Thanks for the help,
This is my working code I will like to share. Change it as you see fit.

decrypter:(src/jd/plugins/decrypter/MltpldCm.java)
REPLACE:
Code:
        String directMultiuploadLink = br.getRegex("<div id=\"downloadbutton_\" style=\".*?><a href=\"(.*?)\"").getMatch(0);
        if (directMultiuploadLink == null) directMultiuploadLink = br.getRegex("\"(http://[a-z0-9]+\\.multiupload\\.com:[0-9]+/files/[A-Za-z0-9]{40,}/.*?)\"").getMatch(0);
        if (directMultiuploadLink != null) decryptedLinks.add(createDownloadlink("directhttp://" + directMultiuploadLink));
WITH:
Code:
		if (br.containsHTML("<div[^>]+id=\"downloadbutton_\""))
			decryptedLinks.add(createDownloadlink(parameter.replaceFirst("http", "httpMltpldCm")));

hoster:(src/jd/plugins/hoster/MltpldCm.java)
Code:
package jd.plugins.hoster;

import java.io.IOException;

import jd.PluginWrapper;
import jd.http.URLConnectionAdapter;
import jd.parser.Regex;
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: 0 $", interfaceVersion = 2, names = { "multiupload.com" }, urls = { "httpMltpldCm://[\\w\\.]*?multiupload\\.com/([A-Z0-9]{2}_[A-Z0-9]+|[0-9A-Z]+)" }, flags = { 0 })
public class MltpldCm extends PluginForHost {

	public MltpldCm(PluginWrapper wrapper) {
		super(wrapper);
	}

	@Override
	public String getAGBLink() {
		return "http://multiupload.com/terms";
	}

	@Override
	public void correctDownloadLink(final DownloadLink link) throws Exception {
		link.setUrlDownload(link.getDownloadURL().replaceFirst("httpMltpldCm", "http"));
	}

	@Override
	public AvailableStatus requestFileInformation(DownloadLink link) throws IOException, PluginException {
		this.setBrowserExclusive();
		br.getPage(link.getDownloadURL());
		if (!br.containsHTML("<div[^>]+id=\"downloadbutton_\""))
			throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
		Regex match = br.getRegex("<font[^>]+>\\(([\\d\\.]+\\s+[kmg]?b)\\)<.*?\\('dlbutton'\\)\\.href='[^']+/files/[0-9A-F]+/([^']+)'");
		if (match.count() > 0) {
			link.setDownloadSize(SizeFormatter.getSize(match.getMatch(0)));
			link.setFinalFileName(match.getMatch(1).trim());
		} else
			throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
		return AvailableStatus.TRUE;
	}

	@Override
	public void handleFree(DownloadLink link) throws Exception {
		requestFileInformation(link);
		String url = br.getRegex("\\('dlbutton'\\)\\.href='([^']+)'").getMatch(0);
		br.setFollowRedirects(true);
		dl = jd.plugins.BrowserAdapter.openDownload(br, link, url, true, 1);
		URLConnectionAdapter urlConnection = dl.getConnection();
		if (!urlConnection.isContentDisposition() && urlConnection.getHeaderField("Cache-Control") != null) {
			urlConnection.disconnect();
			throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE, 10 * 60 * 1000l);
		}
		this.dl.startDownload();
	}

	@Override
	public void reset() {
	}

	@Override
	public void resetDownloadlink(DownloadLink link) {
	}

}

Last edited by fcpt; 13.12.2011 at 20:44.
Reply With Quote
  #4  
Old 13.12.2011, 21:27
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
The Porn Guy
 
Join Date: Mar 2009
Location: Deutschland
Posts: 35,925
Default

Added a multiupload hosterplugin and changed the decrypter.
Thanks for your code.
I changed many things but the basic structure is still yours^^
Wait for the next update!

By the way new programmers are always welcome!

GreeZ pspzockerscene
__________________

Ad-free installers || Werbefreie Installer
<--Current Stable 0.9.581-->Windows Setup
Windows Setup<--JD2 BETA-->Linux Setup x86 || Linux Setup x64 || Mac Setup
-----=>Support Chat<=-----
Spoiler:

Haha nice one Jiaz
Quote:
Originally Posted by Jiaz View Post
netload free does not support free
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
  #5  
Old 08.01.2012, 11:19
maynak00's Avatar
maynak00 maynak00 is offline
JD Legend
 
Join Date: May 2009
Location: Turkey
Posts: 1,853
Default

direct download support broken
ex. link:**External links are only visible to Supporters**

linkgrabber:offline>error, try restarting this link
web browser:click direct download>asks captcha
sorry for my English
Reply With Quote
  #6  
Old 08.01.2012, 12:11
Jiaz's Avatar
Jiaz Jiaz is offline
The Hoss
 
Join Date: Mar 2009
Location: Germany
Posts: 25,474
Default

__________________
JD-Dev & Server-Admin
Reply With Quote
  #7  
Old 08.01.2012, 19:12
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
The Porn Guy
 
Join Date: Mar 2009
Location: Deutschland
Posts: 35,925
Default

Fixed, wait for the next update!

GreeZ pspzockerscene
__________________

Ad-free installers || Werbefreie Installer
<--Current Stable 0.9.581-->Windows Setup
Windows Setup<--JD2 BETA-->Linux Setup x86 || Linux Setup x64 || Mac Setup
-----=>Support Chat<=-----
Spoiler:

Haha nice one Jiaz
Quote:
Originally Posted by Jiaz View Post
netload free does not support free
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
  #8  
Old 11.01.2012, 07:20
audio20's Avatar
audio20 audio20 is offline
Giga Loader
 
Join Date: Jun 2009
Posts: 94
Default

Quote:
Originally Posted by pspzockerscene View Post
Fixed, wait for the next update!
That is one of the things I do not quite understand...

If it is fixed, this decrypter/plugin alone would be worth having another update, but it's been 3 days already with it not working properly, even though it is fixed and ready to go at your side there...

I would really like to know why wait so long to give us this update? (there must be a reason why, I suppose, but I can't figure out...)
Reply With Quote
  #9  
Old 11.01.2012, 08:49
raztoki's Avatar
raztoki raztoki is offline
Tasmanian JDevil
 
Join Date: Apr 2010
Location: Australia
Posts: 7,692
Default

Updates are pushed manually from the svn into existing branches. Jiaz does this and is not an automated process. We are releasing updates ~once a week at this stage, so you need to wait for the next round of updates to become publicly available. To monitor this you can run jdupdate.jar or monitor the changelog http://jdownloader.org/changes/index . If Jiaz pushes updates from his home rather than work the changelog doesn't get updated so some times not 100% accurate.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #10  
Old 11.01.2012, 10:49
remi remi is offline
JD Legend
 
Join Date: Mar 2009
Location: Absurdistan
Posts: 16,373
Default

@audio20

The releases of plug-in updates happen every 11 days on average. See statistical analysis if you want to have more details. I think the release process means a lot of work, because Jiaz reviews every change before it's released.
__________________
WikiLeaks is the Intelligence Agency of the People, defending People against the Hypocrisy and the Crimes of the Neo-Communist Power Elites. Governments are like a metastatic cancer.
Reply With Quote
  #11  
Old 11.01.2012, 15:02
audio20's Avatar
audio20 audio20 is offline
Giga Loader
 
Join Date: Jun 2009
Posts: 94
Default

Got it. It is quite clear now and indeed makes sense. Thanks for the information, raztoki and remi!
Reply With Quote
  #12  
Old 13.01.2012, 19:23
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
The Porn Guy
 
Join Date: Mar 2009
Location: Deutschland
Posts: 35,925
Default

In the future updates will be much much faster but future is still some time away

GreeZ pspzockerscene
__________________

Ad-free installers || Werbefreie Installer
<--Current Stable 0.9.581-->Windows Setup
Windows Setup<--JD2 BETA-->Linux Setup x86 || Linux Setup x64 || Mac Setup
-----=>Support Chat<=-----
Spoiler:

Haha nice one Jiaz
Quote:
Originally Posted by Jiaz View Post
netload free does not support free
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 20:30.
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.