summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-18 00:14:21 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-18 00:14:21 +0100
commit2525478e72e5031e6f112532fac7fc431d78c328 (patch)
tree20cf515deda10f751da2d586e5d726384b0999a3
parent[SimpleHoster] Fix https://github.com/pyload/pyload/issues/1045 (diff)
parent[CatShareNet] Added premium account handler (diff)
downloadpyload-2525478e72e5031e6f112532fac7fc431d78c328.tar.xz
Merge pull request #1051 from rukasuzu/patch-1
[CatShareNet] Added premium account handler
-rw-r--r--module/plugins/hoster/CatShareNet.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py
index f2ddd64a0..19598a092 100644
--- a/module/plugins/hoster/CatShareNet.py
+++ b/module/plugins/hoster/CatShareNet.py
@@ -28,6 +28,7 @@ class CatShareNet(SimpleHoster):
IP_BLOCKED_PATTERN = ur'>Nasz serwis wykrył że Twój adres IP nie pochodzi z Polski.<'
SECONDS_PATTERN = 'var\scount\s=\s(\d+);'
LINK_FREE_PATTERN = r'<form action="(.+?)" method="GET">'
+ LINK_PREMIUM_PATTERN = r'<form action="(.+?)" method="GET">'
def setup(self):
@@ -41,6 +42,14 @@ class CatShareNet(SimpleHoster):
self.fail(_("Only connections from Polish IP address are allowed"))
return super(CatShareNet, self).getFileInfo()
+ def handlePremium(self):
+ m = re.search(self.LINK_PREMIUM_PATTERN, self.html)
+ if m is None:
+ self.fail(_("File not found"))
+
+ dl_link = m.group(1)
+ self.download(dl_link, disposition=True)
+
def handleFree(self, pyfile):
m = re.search(self.SECONDS_PATTERN, self.html)