summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/NetfolderIn.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/crypter/NetfolderIn.py')
-rw-r--r--module/plugins/crypter/NetfolderIn.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/module/plugins/crypter/NetfolderIn.py b/module/plugins/crypter/NetfolderIn.py
index 876b2093f..62dc5c914 100644
--- a/module/plugins/crypter/NetfolderIn.py
+++ b/module/plugins/crypter/NetfolderIn.py
@@ -2,7 +2,7 @@
import re
-from pyload.plugin.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class NetfolderIn(SimpleCrypter):
@@ -10,7 +10,7 @@ class NetfolderIn(SimpleCrypter):
__type__ = "crypter"
__version__ = "0.72"
- __pattern__ = r'http://(?:www\.)?netfolder\.in/((?P<id1>\w+)/\w+|folder\.php\?folder_id=(?P<id2>\w+))'
+ __pattern__ = r'http://(?:www\.)?netfolder\.in/(folder\.php\?folder_id=)?(?P<ID>\w+)(?(1)|/\w+)'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
("subfolder_per_package", "bool", "Create a subfolder for each package", True)]
@@ -43,8 +43,8 @@ class NetfolderIn(SimpleCrypter):
def submitPassword(self):
# Gather data
try:
- m = re.match(self.__pattern__, self.pyfile.url)
- id = max(m.group('id1'), m.group('id2'))
+ 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
@@ -68,3 +68,6 @@ class NetfolderIn(SimpleCrypter):
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)