summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2014-02-19 20:49:14 +0100
committerGravatar Stefano <l.stickell@yahoo.it> 2014-04-21 16:56:19 +0200
commitf2e43058509da02c61321802ff5ffc5bc647a04b (patch)
tree6330e9c2c0ee7b9a8c9e901c15e3f4aee52a1a83
parentXFileSharingPro: (diff)
downloadpyload-f2e43058509da02c61321802ff5ffc5bc647a04b.tar.xz
Merge pull request #511 from vuolter/s/hoster/RyushareCom
RyushareCom: Free dl fix (thx nomad71) (cherry picked from commit c4ed8e60017f66ce23ff08c9dfe38be1eb0919b9)
-rw-r--r--pyload/plugins/hoster/RyushareCom.py28
1 files changed, 10 insertions, 18 deletions
diff --git a/pyload/plugins/hoster/RyushareCom.py b/pyload/plugins/hoster/RyushareCom.py
index 675eaddde..77efa0081 100644
--- a/pyload/plugins/hoster/RyushareCom.py
+++ b/pyload/plugins/hoster/RyushareCom.py
@@ -12,11 +12,11 @@ from module.plugins.internal.CaptchaService import SolveMedia
class RyushareCom(XFileSharingPro):
__name__ = "RyushareCom"
__type__ = "hoster"
- __pattern__ = r"http://(?:\w*\.)*?ryushare.com/\w{11,}"
- __version__ = "0.13"
+ __pattern__ = r"http://(?:www\.)?ryushare\.com/\w+"
+ __version__ = "0.14"
__description__ = """ryushare.com hoster plugin"""
- __author_name__ = ("zoidberg", "stickell","quareevo")
- __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it","quareevo@arcor.de")
+ __author_name__ = ("zoidberg", "stickell", "quareevo")
+ __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it", "quareevo@arcor.de")
HOSTER_NAME = "ryushare.com"
@@ -24,13 +24,6 @@ class RyushareCom(XFileSharingPro):
DIRECT_LINK_PATTERN = r'(http://([^/]*?ryushare.com|\d+\.\d+\.\d+\.\d+)(:\d+/d/|/files/\w+/\w+/)[^"\'<]+)'
SOLVEMEDIA_PATTERN = r'http:\/\/api\.solvemedia\.com\/papi\/challenge\.script\?k=(.*?)"'
- 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):
retry = False
self.html = self.load(self.pyfile.url)
@@ -42,15 +35,15 @@ class RyushareCom(XFileSharingPro):
action, inputs = self.parseHtmlForm('F1')
self.setWait(65)
- # Wait
+ # Wait 1 hour
if 'You have reached the download-limit!!!' in self.html:
- self.setWait(3600, True)
+ self.setWait(1 * 60 * 60, True)
retry = True
-
+
match = re.search(self.WAIT_PATTERN, self.html)
if match:
m = match.groupdict(0)
- waittime = int(m["hour"])*60*60 + int(m['min']) * 60 + int(m['sec'])
+ waittime = int(m["hour"]) * 60 * 60 + int(m['min']) * 60 + int(m['sec'])
self.setWait(waittime, True)
retry = True
@@ -59,7 +52,6 @@ class RyushareCom(XFileSharingPro):
self.retry()
for i in xrange(5):
-
m = re.search(self.SOLVEMEDIA_PATTERN, self.html)
if not m:
self.parseError("Error parsing captcha")
@@ -71,14 +63,13 @@ class RyushareCom(XFileSharingPro):
inputs["adcopy_challenge"] = challenge
inputs["adcopy_response"] = response
- self.html = self.load(self.pyfile.url, post = inputs)
+ self.html = self.load(self.pyfile.url, post=inputs)
if "WRONG CAPTCHA" in self.html:
self.invalidCaptcha()
self.logInfo("Invalid Captcha")
else:
self.correctCaptcha()
break
-
else:
self.fail("You have entered 5 invalid captcha codes")
@@ -86,4 +77,5 @@ class RyushareCom(XFileSharingPro):
m = re.search(r'<a href="([^"]+)">Click here to download</a>', self.html)
return m.group(1)
+
getInfo = create_getInfo(RyushareCom)