#1
|
|||
|
|||
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. |
#2
|
||||
|
||||
Quote:
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 |
#3
|
|||
|
|||
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)); 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. |
#4
|
||||
|
||||
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 |
#5
|
||||
|
||||
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 |
#6
|
||||
|
||||
__________________
JD-Dev & Server-Admin |
#7
|
||||
|
||||
Fixed, wait for the next update!
GreeZ pspzockerscene
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#8
|
|||
|
|||
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...) |
#9
|
||||
|
||||
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. :] |
#10
|
|||
|
|||
@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. |
#11
|
|||
|
|||
Got it. It is quite clear now and indeed makes sense. Thanks for the information, raztoki and remi!
|
#12
|
||||
|
||||
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 |
Thread Tools | |
Display Modes | |
|
|