summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar zoidberg10 <zoidberg@mujmail.cz> 2011-11-01 15:13:35 +0100
committerGravatar zoidberg10 <zoidberg@mujmail.cz> 2011-11-01 15:13:35 +0100
commit9a025c1d7f670a7fc2cae5350e1a79a77df76671 (patch)
tree61ea048373d2dbd6041c4eb028066ee1849f0f20 /module
parentfilesonic/wupload folders (diff)
downloadpyload-9a025c1d7f670a7fc2cae5350e1a79a77df76671.tar.xz
another response 401 fix for share-rapid.com
Diffstat (limited to 'module')
-rw-r--r--module/plugins/hoster/ShareRapidCom.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/module/plugins/hoster/ShareRapidCom.py b/module/plugins/hoster/ShareRapidCom.py
index 1c83a889c..46818a84c 100644
--- a/module/plugins/hoster/ShareRapidCom.py
+++ b/module/plugins/hoster/ShareRapidCom.py
@@ -42,8 +42,8 @@ def getInfo(urls):
class ShareRapidCom(Hoster):
__name__ = "ShareRapidCom"
__type__ = "hoster"
- __pattern__ = r"http://(?:www\.)?((share(-?rapid\.(biz|com|cz|info|eu|net|org|pl|sk)|-(central|credit|free|net)\.cz|-ms\.net)|(s-?rapid|rapids)\.(cz|sk))|(e-stahuj|mediatack|premium-rapidshare|rapidshare-premium|qiuck)\.cz|kadzet\.com|stahuj-zdarma\.eu|strelci\.net|universal-share\.com)/.*"
- __version__ = "0.41"
+ __pattern__ = r"http://(?:www\.)?((share(-?rapid\.(biz|com|cz|info|eu|net|org|pl|sk)|-(central|credit|free|net)\.cz|-ms\.net)|(s-?rapid|rapids)\.(cz|sk))|(e-stahuj|mediatack|premium-rapidshare|rapidshare-premium|qiuck)\.cz|kadzet\.com|stahuj-zdarma\.eu|strelci\.net|universal-share\.com)/(stahuj/.+)"
+ __version__ = "0.42"
__description__ = """Share-rapid.com plugin - premium only"""
__author_name__ = ("MikyWoW", "zoidberg")
__author_mail__ = ("MikyWoW@seznam.cz", "zoidberg@mujmail.cz")
@@ -62,12 +62,14 @@ class ShareRapidCom(Hoster):
def process(self, pyfile):
if not self.account: self.fail("User not logged in")
+ url = "http://share-rapid.com/" + re.search(self.__pattern__, pyfile.url).groups()[-1]
+ self.logDebug("URL: " + url)
try:
- self.html = self.load(pyfile.url, decode=True)
- except BadHeader:
+ self.html = self.load(url, decode=True)
+ except BadHeader, e:
self.account.relogin(self.user)
- self.retry(3, 0, 'Bad server response, not logged in?')
+ self.retry(3, 0, str(e))
size, units = re.search(self.FILE_SIZE_PATTERN, self.html).groups()
pyfile.size = float(size) * 1024 ** {'kB': 1, 'MB': 2, 'GB': 3}[units]