summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/RyushareCom.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-06-09 18:10:22 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-06-09 18:10:23 +0200
commit16af85004c84d0d6c626b4f8424ce9647669a0c1 (patch)
tree025d479862d376dbc17e934f4ed20031c8cd97d1 /module/plugins/hoster/RyushareCom.py
parentadapted to jshint config (diff)
downloadpyload-16af85004c84d0d6c626b4f8424ce9647669a0c1.tar.xz
moved everything from module to pyload
Diffstat (limited to 'module/plugins/hoster/RyushareCom.py')
-rw-r--r--module/plugins/hoster/RyushareCom.py55
1 files changed, 0 insertions, 55 deletions
diff --git a/module/plugins/hoster/RyushareCom.py b/module/plugins/hoster/RyushareCom.py
deleted file mode 100644
index 7bfe4e8fe..000000000
--- a/module/plugins/hoster/RyushareCom.py
+++ /dev/null
@@ -1,55 +0,0 @@
-# -*- coding: utf-8 -*-
-from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo
-import re
-
-
-class RyushareCom(XFileSharingPro):
- __name__ = "RyushareCom"
- __type__ = "hoster"
- __pattern__ = r"http://(?:\w*\.)*?ryushare.com/\w{11,}"
- __version__ = "0.11"
- __description__ = """ryushare.com hoster plugin"""
- __author_name__ = ("zoidberg", "stickell")
- __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it")
-
- HOSTER_NAME = "ryushare.com"
-
- WAIT_PATTERN = r'(?:You have to|Please) wait (?:(?P<min>\d+) minutes, )?(?:<span id="[^"]+">)?(?P<sec>\d+)(?:</span>)? seconds'
- DIRECT_LINK_PATTERN = r'<a href="([^"]+)">Click here to download</a>'
-
- def setup(self):
- self.resumeDownload = self.multiDL = True
- if not self.premium:
- self.limitDL = 2
- # Up to 3 chunks allowed in free downloads. Unknown for premium
- self.chunkLimit = 3
-
- def getDownloadLink(self):
- self.html = self.load(self.pyfile.url)
- action, inputs = self.parseHtmlForm(input_names={"op": re.compile("^download")})
- if inputs.has_key('method_premium'):
- del inputs['method_premium']
-
- self.html = self.load(self.pyfile.url, post = inputs)
- action, inputs = self.parseHtmlForm('F1')
-
- for i in xrange(10):
- self.logInfo('Attempt to detect direct link #%d' % i)
-
- # Wait
- if 'You have reached the download-limit!!!' in self.html:
- self.setWait(3600, True)
- else:
- m = re.search(self.WAIT_PATTERN, self.html).groupdict('0')
- waittime = int(m['min']) * 60 + int(m['sec'])
- self.setWait(waittime)
- self.wait()
-
- self.html = self.load(self.pyfile.url, post = inputs)
- if 'Click here to download' in self.html:
- m = re.search(self.DIRECT_LINK_PATTERN, self.html)
- return m.group(1)
-
- self.parseError('No direct link within 10 retries')
-
-getInfo = create_getInfo(RyushareCom)