JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 13.12.2011, 19:24
fcpt
Guest
 
Posts: n/a
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 13:11.
Reply With Quote
  #2  
Old 13.12.2011, 19:29
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 73,118
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
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #3  
Old 13.12.2011, 21:41
fcpt
Guest
 
Posts: n/a
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("direct**External links are only visible to Support Staff** + 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 "**External links are only visible to Support Staff**;
	}

	@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 21:44.
Reply With Quote
  #4  
Old 13.12.2011, 22:27
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 73,118
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
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #5  
Old 08.01.2012, 12:19
maynak00's Avatar
maynak00 maynak00 is offline
JD Legend
 
Join Date: May 2009
Location: Turkey
Posts: 2,051
Default

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

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, 13:11
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 81,049
Default

__________________
JD-Dev & Server-Admin
Reply With Quote
  #7  
Old 08.01.2012, 20:12
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 73,118
Default

Fixed, wait for the next update!

GreeZ pspzockerscene
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #8  
Old 11.01.2012, 08:20
audio20 audio20 is offline
Registered / Inactive
 
Join Date: Jun 2009
Posts: 125
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, 09:49
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,671
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, 11:49
remi
Guest
 
Posts: n/a
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.
Reply With Quote
  #11  
Old 11.01.2012, 16:02
audio20 audio20 is offline
Registered / Inactive
 
Join Date: Jun 2009
Posts: 125
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, 20:23
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 73,118
Default

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

GreeZ pspzockerscene
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
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 12:47.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.