summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/hoster/RapidgatorNet.py4
-rw-r--r--module/plugins/hoster/RyushareCom.py49
-rw-r--r--module/plugins/hoster/SpeedLoadOrg.py5
3 files changed, 49 insertions, 9 deletions
diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py
index 8a440d410..6c1c231fe 100644
--- a/module/plugins/hoster/RapidgatorNet.py
+++ b/module/plugins/hoster/RapidgatorNet.py
@@ -29,7 +29,7 @@ class RapidgatorNet(SimpleHoster):
__name__ = "RapidgatorNet"
__type__ = "hoster"
__pattern__ = r"http://(?:www\.)?(rapidgator.net)/file/(\d+)"
- __version__ = "0.14"
+ __version__ = "0.15"
__description__ = """rapidgator.net"""
__author_name__ = ("zoidberg","chrox")
@@ -39,7 +39,7 @@ class RapidgatorNet(SimpleHoster):
FILE_OFFLINE_PATTERN = r'<title>File not found</title>'
JSVARS_PATTERN = r"\s+var\s*(startTimerUrl|getDownloadUrl|captchaUrl|fid|secs)\s*=\s*'?(.*?)'?;"
- DOWNLOAD_LINK_PATTERN = r"else {\s*location.href = '(.*?)'"
+ DOWNLOAD_LINK_PATTERN = r"location.href = '([^']+)';\s*}\s*return false;"
RECAPTCHA_KEY_PATTERN = r'"http://api.recaptcha.net/challenge?k=(.*?)"'
ADSCAPTCHA_SRC_PATTERN = r'(http://api.adscaptcha.com/Get.aspx[^"\']*)'
SOLVEMEDIA_PATTERN = r'http:\/\/api\.solvemedia\.com\/papi\/challenge\.script\?k=(.*?)"'
diff --git a/module/plugins/hoster/RyushareCom.py b/module/plugins/hoster/RyushareCom.py
index 9bbbdcb91..19f17b531 100644
--- a/module/plugins/hoster/RyushareCom.py
+++ b/module/plugins/hoster/RyushareCom.py
@@ -1,18 +1,55 @@
# -*- coding: utf-8 -*-
from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo
+import re
+
+def to_seconds(m):
+ minutes = int(m['min']) if m['min'] else 0
+ seconds = int(m['sec']) if m['sec'] else 0
+ return minutes * 60 + seconds
class RyushareCom(XFileSharingPro):
__name__ = "RyushareCom"
__type__ = "hoster"
__pattern__ = r"http://(?:\w*\.)*?ryushare.com/\w{11,}"
- __version__ = "0.03"
+ __version__ = "0.07"
__description__ = """ryushare.com hoster plugin"""
- __author_name__ = ("zoidberg")
- __author_mail__ = ("zoidberg@mujmail.cz")
-
+ __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'
+
def setup(self):
self.resumeDownload = self.multiDL = self.premium
+ # 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)
+ self.setWait(to_seconds(m.groupdict()))
+ self.wait()
+
+ self.html = self.load(self.pyfile.url, post = inputs)
+ if 'Click here to download' in self.html:
+ m = re.search(r'<a href="([^"]+)">Click here to download</a>', self.html)
+ return m.group(1)
+
+ self.parseError('No direct link within 10 retries')
-getInfo = create_getInfo(RyushareCom) \ No newline at end of file
+getInfo = create_getInfo(RyushareCom)
diff --git a/module/plugins/hoster/SpeedLoadOrg.py b/module/plugins/hoster/SpeedLoadOrg.py
index 65eead5a5..32e7baf13 100644
--- a/module/plugins/hoster/SpeedLoadOrg.py
+++ b/module/plugins/hoster/SpeedLoadOrg.py
@@ -5,7 +5,7 @@ class SpeedLoadOrg(XFileSharingPro):
__name__ = "SpeedLoadOrg"
__type__ = "hoster"
__pattern__ = r"http://(www\.)?speedload\.org/(?P<ID>\w+)"
- __version__ = "1.00"
+ __version__ = "1.01"
__description__ = """Speedload.org hoster plugin"""
__author_name__ = ("stickell")
__author_mail__ = ("l.stickell@yahoo.it")
@@ -15,4 +15,7 @@ class SpeedLoadOrg(XFileSharingPro):
HOSTER_NAME = "speedload.org"
+ def handlePremium(self):
+ self.download(self.pyfile.url, post = self.getPostParameters())
+
getInfo = create_getInfo(SpeedLoadOrg)