summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/NosuploadCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/NosuploadCom.py')
-rw-r--r--module/plugins/hoster/NosuploadCom.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/module/plugins/hoster/NosuploadCom.py b/module/plugins/hoster/NosuploadCom.py
index 1de734222..3187dd89f 100644
--- a/module/plugins/hoster/NosuploadCom.py
+++ b/module/plugins/hoster/NosuploadCom.py
@@ -9,7 +9,9 @@ class NosuploadCom(XFileSharingPro):
__name__ = "NosuploadCom"
__type__ = "hoster"
__version__ = "0.1"
+
__pattern__ = r'http://(?:www\.)?nosupload\.com/\?d=\w{12}'
+
__description__ = """Nosupload.com hoster plugin"""
__author_name__ = "igel"
__author_mail__ = "igelkun@myopera.com"
@@ -17,9 +19,10 @@ class NosuploadCom(XFileSharingPro):
HOSTER_NAME = "nosupload.com"
FILE_SIZE_PATTERN = r'<p><strong>Size:</strong> (?P<S>[0-9\.]+) (?P<U>[kKMG]?B)</p>'
- DIRECT_LINK_PATTERN = r'<a class="select" href="(http://.+?)">Download</a>'
+ LINK_PATTERN = r'<a class="select" href="(http://.+?)">Download</a>'
WAIT_PATTERN = r'Please wait.*?>(\d+)</span>'
+
def getDownloadLink(self):
# stage1: press the "Free Download" button
data = self.getPostParameters()
@@ -33,7 +36,7 @@ class NosuploadCom(XFileSharingPro):
self.html = self.load(self.pyfile.url, post=data, ref=True, decode=True)
# stage3: get the download link
- return re.search(self.DIRECT_LINK_PATTERN, self.html, re.S).group(1)
+ return re.search(self.LINK_PATTERN, self.html, re.S).group(1)
getInfo = create_getInfo(NosuploadCom)