Repository: pyload/pyload

Issue:
MultiUpOrg crypter issue
Hi all,

I tried to download a link from the following url : http://www.multiup.org/fr/download/acc13ec3f1b1214919b55d4a70c16190/Lulu.Vroumette.S1x03_Capitaine.Lulu.avi
When I use the debug mode, here is what I get :

```
18.08.2015 23:55:44 INFO      Decrypting starts: Lulu.Vroumette.S1x03_Capitaine.Lulu.avi
18.08.2015 23:55:44 DEBUG     HOOK UserAgentSwitcher: Use custom user-agent string: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0
18.08.2015 23:55:44 DEBUG     CRYPTER MultiUpOrg[9]: PROCESS URL http://www.multiup.org/en/download/acc13ec3f1b1214919b55d4a70c16190/Lulu.Vroumette.S1x03_Capitaine.Lulu.avi | PLUGIN VERSION 0.04
18.08.2015 23:55:44 INFO      CRYPTER MultiUpOrg[9]: Updating file info...
18.08.2015 23:55:45 DEBUG     CRYPTER MultiUpOrg[9]: File info: {'status': 2, 'url': u'http://www.multiup.org/en/download/acc13ec3f1b1214919b55d4a70c16190/Lulu.Vroumette.S1x03_Capitaine.Lulu.avi', 'size': 0, 'name': u'Lulu.Vroumette.S1x03_Capitaine.Lulu.avi', 'pattern': {'TYPE': u'download', 'N': u'Lulu.Vroumette.S1x03_Capitaine.Lulu.avi'}}
18.08.2015 23:55:45 DEBUG     CRYPTER MultiUpOrg[9]: Previous file info: {}
18.08.2015 23:55:45 INFO      CRYPTER MultiUpOrg[9]: File name: Lulu.Vroumette.S1x03_Capitaine.Lulu.avi
18.08.2015 23:55:45 INFO      CRYPTER MultiUpOrg[9]: File size: Unknown
18.08.2015 23:55:45 INFO      CRYPTER MultiUpOrg[9]: File status: online
18.08.2015 23:55:45 DEBUG     CRYPTER MultiUpOrg[9]: Looking for direct download link...
18.08.2015 23:55:45 DEBUG     CRYPTER MultiUpOrg[9]: Redirect #0 to: http://www.multiup.org/en/download/acc13ec3f1b1214919b55d4a70c16190/Lulu.Vroumette.S1x03_Capitaine.Lulu.avi
18.08.2015 23:55:45 DEBUG     CRYPTER MultiUpOrg[9]: LOAD URL http://www.multiup.org/en/download/acc13ec3f1b1214919b55d4a70c16190/Lulu.Vroumette.S1x03_Capitaine.Lulu.avi | cookies=True | get={} | req=None | decode=True | multipart=False | post={} | ref=True | just_header=True
18.08.2015 23:55:45 ERROR     Decrypting failed: Lulu.Vroumette.S1x03_Capitaine.Lulu.avi | 'MultiUpOrg' object has no attribute 'links'
Traceback (most recent call last):
  File "/home.sav/dl/pyload/module/PluginThread.py", line 363, in run
    self.active.plugin.preprocessing(self)
  File "/home.sav/dl/pyload/.pyload/userplugins/internal/Hoster.py", line 185, in preprocessing
    return self.process(self.pyfile)
  File "/home.sav/dl/pyload/module/plugins/internal/Crypter.py", line 41, in process
    self.decrypt(pyfile)
  File "/home.sav/dl/pyload/module/plugins/internal/SimpleCrypter.py", line 101, in decrypt
    if self.link or self.links or self.urls or self.packages:
AttributeError: 'MultiUpOrg' object has no attribute 'links'
```

I tried to modify a bit the following file "module/plugins/crypter/MultiUpOrg.py" (
version "0.04") but got no success (in particular, when using french, there is no "<h5>DOWNLOAD</h5>" but "<h5>TÉLÉCHARGER</h5>'.
But it's not the cause of the issue as I tried with the "english" version of the url...

Please could you help me ;)

Regards



Discussion:

Resolving patch:
diff --git a/module/plugins/crypter/MultiUpOrg.py b/module/plugins/crypter/MultiUpOrg.py
--- a/module/plugins/crypter/MultiUpOrg.py
+++ b/module/plugins/crypter/MultiUpOrg.py
@@ -9,10 +9,10 @@
 class MultiUpOrg(SimpleCrypter):
     __name__    = "MultiUpOrg"
     __type__    = "crypter"
-    __version__ = "0.04"
+    __version__ = "0.05"
     __status__  = "testing"
 
-    __pattern__ = r'http://(?:www\.)?multiup\.org/(en|fr)/(?P<TYPE>project|download|miror)/\w+(/\w+)?'
+    __pattern__ = r'http://(?:www\.)?multiup\.org/(en|fr)/(?P<TYPE>project|download|mirror)/\w+(/\w+)?'
     __config__  = [("use_premium"       , "bool", "Use premium account if available"   , True),
                    ("use_subfolder"     , "bool", "Save package to subfolder"          , True),
                    ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
@@ -34,8 +34,8 @@ def get_links(self):
             pattern = r'style="width:97%;text-align:left".*\n.*href="(.*)"'
             if m_type == "download":
                 dl_pattern = r'href="(.*)">.*\n.*<h5>DOWNLOAD</h5>'
-                miror_page = urlparse.urljoin("http://www.multiup.org/", re.search(dl_pattern, self.html).group(1))
-                self.html = self.load(miror_page)
+                mirror_page = urlparse.urljoin("http://www.multiup.org/", re.search(dl_pattern, self.html).group(1))
+                self.html = self.load(mirror_page)
 
         return re.findall(pattern, self.html)
 
diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py
--- a/module/plugins/internal/SimpleCrypter.py
+++ b/module/plugins/internal/SimpleCrypter.py
@@ -10,7 +10,7 @@
 class SimpleCrypter(Crypter, SimpleHoster):
     __name__    = "SimpleCrypter"
     __type__    = "crypter"
-    __version__ = "0.60"
+    __version__ = "0.61"
     __status__  = "testing"
 
     __pattern__ = r'^unmatchable$'
@@ -91,6 +91,7 @@ def handle_direct(self, pyfile):
 
 
     def decrypt(self, pyfile):
+        self.links = []    #@TODO: Recheck in 0.4.10
         self.prepare()
         self.check_info()  #@TODO: Remove in 0.4.10
 


Test patch: