summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-06-16 17:56:56 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-06-24 22:40:42 +0200
commitbbfb147465b17f1add056c074dffa7a73b278075 (patch)
tree60d9324de78c05b36976c94c7ff9bf3efdf6fd7b /module/plugins/hoster
parentUpdate all (diff)
downloadpyload-bbfb147465b17f1add056c074dffa7a73b278075.tar.xz
[NowDownloadSx] Tiny cleanup
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/NowDownloadSx.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/module/plugins/hoster/NowDownloadSx.py b/module/plugins/hoster/NowDownloadSx.py
index b23382420..7be699ae4 100644
--- a/module/plugins/hoster/NowDownloadSx.py
+++ b/module/plugins/hoster/NowDownloadSx.py
@@ -11,7 +11,7 @@ class NowDownloadSx(SimpleHoster):
__type__ = "hoster"
__version__ = "0.10"
- __pattern__ = r'http://(?:www\.)?(nowdownload\.([a-zA-Z]{2,})/(dl/|download\.php.+?id=|mobile/(#/files/|.+?id=))|likeupload\.org/)\w+'
+ __pattern__ = r'http://(?:www\.)?(nowdownload\.[a-zA-Z]{2,}/(dl/|download\.php.+?id=|mobile/(#/files/|.+?id=))|likeupload\.org/)\w+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """NowDownload.sx hoster plugin"""
@@ -26,7 +26,7 @@ class NowDownloadSx(SimpleHoster):
TOKEN_PATTERN = r'"(/api/token\.php\?token=\w+)"'
CONTINUE_PATTERN = r'"(/dl2/\w+/\w+)"'
WAIT_PATTERN = r'\.countdown\(\{until: \+(\d+),'
- LINK_FREE_PATTERN = r'(http://s\d+(\.coolcdn\.info|\.mighycdndelivery\.com)/nowdownload/.+?)["\']'
+ LINK_FREE_PATTERN = r'(http://s\d+(?:\.coolcdn\.info|\.mighycdndelivery\.com)/nowdownload/.+?)["\']'
NAME_REPLACEMENTS = [("&#?\w+;", fixup), (r'<.*?>', '')]
@@ -49,12 +49,7 @@ class NowDownloadSx(SimpleHoster):
else:
wait = 60
- foundbu = re.match(self.__pattern__, self.pyfile.url)
- if foundbu:
- baseurl = "http://www.nowdownload." + foundbu.group(2)
- else:
- baseurl = "http://www.nowdownload.ch"
-
+ baseurl = "http://www.nowdownload.ch"
self.html = self.load(baseurl + str(tokenlink.group(1)))
self.wait(wait)