summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/NetfolderIn.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-27 23:35:23 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-27 23:35:23 +0200
commit189f9e90d2814713e343ea340d6ada86fc217f3e (patch)
tree4f17fb11d75f6c391f1152cfa44a0ee9ab63affe /module/plugins/crypter/NetfolderIn.py
parentFix https://github.com/pyload/pyload/issues/1428 (diff)
downloadpyload-189f9e90d2814713e343ea340d6ada86fc217f3e.tar.xz
[NetloadIn] Mark dead (temp)
Diffstat (limited to 'module/plugins/crypter/NetfolderIn.py')
-rw-r--r--module/plugins/crypter/NetfolderIn.py64
1 files changed, 5 insertions, 59 deletions
diff --git a/module/plugins/crypter/NetfolderIn.py b/module/plugins/crypter/NetfolderIn.py
index ac76c059e..32d59af03 100644
--- a/module/plugins/crypter/NetfolderIn.py
+++ b/module/plugins/crypter/NetfolderIn.py
@@ -1,19 +1,15 @@
# -*- coding: utf-8 -*-
-import re
+from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
-from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
-
-class NetfolderIn(SimpleCrypter):
+class NetfolderIn(DeadCrypter):
__name__ = "NetfolderIn"
__type__ = "crypter"
- __version__ = "0.72"
+ __version__ = "0.73"
- __pattern__ = r'http://(?:www\.)?netfolder\.in/(folder\.php\?folder_id=)?(?P<ID>\w+)(?(1)|/\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)]
+ __pattern__ = r'http://(?:www\.)?netfolder\.(in|me)/(folder\.php\?folder_id=)?(?P<ID>\w+)(?(1)|/\w+)'
+ __config__ = [] #@TODO: Remove in 0.4.10
__description__ = """NetFolder.in decrypter plugin"""
__license__ = "GPLv3"
@@ -21,54 +17,4 @@ class NetfolderIn(SimpleCrypter):
("fragonib", "fragonib[AT]yahoo[DOT]es")]
- NAME_PATTERN = r'<div class="Text">Inhalt des Ordners <span.*>(?P<N>.+)</span></div>'
-
-
- def prepare(self):
- super(NetfolderIn, self).prepare()
-
- # Check for password protection
- if self.isPasswordProtected():
- self.html = self.submitPassword()
- if not self.html:
- self.fail(_("Incorrect password, please set right password on Add package form and retry"))
-
-
- def isPasswordProtected(self):
- if '<input type="password" name="password"' in self.html:
- self.logDebug("Links are password protected")
- return True
- return False
-
-
- def submitPassword(self):
- # Gather data
- try:
- m = re.match(self.__pattern__, self.pyfile.url)
- id = m.group('ID')
- except AttributeError:
- self.logDebug("Unable to get package id from url [%s]" % self.pyfile.url)
- return
- url = "http://netfolder.in/folder.php?folder_id=" + id
- password = self.getPassword()
-
- # Submit package password
- post = {'password': password, 'save': 'Absenden'}
- self.logDebug("Submitting password [%s] for protected links with id [%s]" % (password, id))
- html = self.load(url, {}, post)
-
- # Check for invalid password
- if '<div class="InPage_Error">' in html:
- self.logDebug("Incorrect password, please set right password on Edit package form and retry")
- return None
-
- return html
-
-
- def getLinks(self):
- links = re.search(r'name="list" value="(.*?)"', self.html).group(1).split(",")
- self.logDebug("Package has %d links" % len(links))
- return links
-
-
getInfo = create_getInfo(NetfolderIn)