diff options
author | zoidberg10 <zoidberg@mujmail.cz> | 2012-10-20 09:30:04 +0200 |
---|---|---|
committer | zoidberg10 <zoidberg@mujmail.cz> | 2012-10-20 09:30:04 +0200 |
commit | 1b494bca9f442b3a8dd75818c68f41235dcdbdfe (patch) | |
tree | 133b30c975f6541b1a01fa289eebc5d8295b53ab /module/plugins/hoster | |
parent | update CaptchaBrotherhood - closed #696, sharerapid.com (diff) | |
download | pyload-1b494bca9f442b3a8dd75818c68f41235dcdbdfe.tar.xz |
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r-- | module/plugins/hoster/HellspyCz.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/RapidgatorNet.py | 5 | ||||
-rw-r--r-- | module/plugins/hoster/WebshareCz.py | 5 | ||||
-rw-r--r-- | module/plugins/hoster/XFileSharingPro.py | 16 |
4 files changed, 18 insertions, 14 deletions
diff --git a/module/plugins/hoster/HellspyCz.py b/module/plugins/hoster/HellspyCz.py index 22838b481..ad0cccd54 100644 --- a/module/plugins/hoster/HellspyCz.py +++ b/module/plugins/hoster/HellspyCz.py @@ -22,15 +22,15 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class HellspyCz(SimpleHoster): __name__ = "HellspyCz" __type__ = "hoster" - __pattern__ = r"http://(?:\w*\.)*hellspy\.(?:cz|com|sk|hu)(/\S+/\d+)/?.*" - __version__ = "0.25" + __pattern__ = r"http://(?:\w*\.)*(?:hellspy\.(?:cz|com|sk|hu|pl)|sciagaj.pl)(/\S+/\d+)/?.*" + __version__ = "0.26" __description__ = """HellSpy.cz""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") FILE_INFO_PATTERN = '<span class="filesize right">(?P<S>[0-9.]+) <span>(?P<U>[kKMG])i?B</span></span>\s*<h1 title="(?P<N>.*?)"' FILE_OFFLINE_PATTERN = r'<h2>(404 - Page|File) not found</h2>' - FILE_URL_REPLACEMENTS = [(r"http://(?:\w*\.)*hellspy\.(?:cz|com|sk|hu)(/\S+/\d+)/?.*", r"http://www.hellspy.com\1")] + FILE_URL_REPLACEMENTS = [(__pattern__, r"http://www.hellspy.com\1")] CREDIT_LEFT_PATTERN = r'<strong>Credits: </strong>\s*(\d+)' DOWNLOAD_AGAIN_PATTERN = r'<a id="button-download-start"[^>]*title="You can download the file without deducting your credit.">' diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py index ad23b5a33..f0d64cae1 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.10" + __version__ = "0.11" __description__ = """rapidgator.net""" __author_name__ = ("zoidberg","chrox") @@ -61,6 +61,7 @@ class RapidgatorNet(SimpleHoster): if status == 200: return json['response'] elif status == 401: + self.account.relogin(self.user) self.retry() elif status == 423: self.account.empty(self.user) @@ -69,7 +70,7 @@ class RapidgatorNet(SimpleHoster): self.fail(msg) def handlePremium(self): - self.account.relogin(self.user) + #self.logDebug("ACCOUNT_DATA", self.account.getAccountData(self.user)) self.api_data = self.getAPIResponse('info') self.api_data['md5'] = self.api_data['hash'] self.pyfile.name = self.api_data['filename'] diff --git a/module/plugins/hoster/WebshareCz.py b/module/plugins/hoster/WebshareCz.py index b60fda7e4..195e65a93 100644 --- a/module/plugins/hoster/WebshareCz.py +++ b/module/plugins/hoster/WebshareCz.py @@ -24,7 +24,7 @@ class WebshareCz(SimpleHoster): __name__ = "WebshareCz" __type__ = "hoster" __pattern__ = r"http://(\w+\.)?webshare.cz/(stahnout/)?(?P<ID>\w{10})-.+" - __version__ = "0.11" + __version__ = "0.12" __description__ = """WebShare.cz""" __author_name__ = ("zoidberg") @@ -33,6 +33,9 @@ class WebshareCz(SimpleHoster): FILE_OFFLINE_PATTERN = r'<h3>Soubor ".*?" nebyl nalezen.</h3>' DOWNLOAD_LINK_PATTERN = r'id="download_link" href="(?P<url>.*?)"' + + def setup(self): + self.multiDL = True def handleFree(self): url_a = re.search(r"(var l.*)", self.html).group(1) diff --git a/module/plugins/hoster/XFileSharingPro.py b/module/plugins/hoster/XFileSharingPro.py index ef559a56f..713198754 100644 --- a/module/plugins/hoster/XFileSharingPro.py +++ b/module/plugins/hoster/XFileSharingPro.py @@ -34,7 +34,7 @@ class XFileSharingPro(SimpleHoster): __name__ = "XFileSharingPro" __type__ = "hoster" __pattern__ = r"^unmatchable$" - __version__ = "0.12" + __version__ = "0.13" __description__ = """XFileSharingPro common hoster base""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") @@ -126,7 +126,7 @@ class XFileSharingPro(SimpleHoster): break else: - if captcha in self.err: + if self.errmsg and 'captcha' in self.errmsg: self.fail("No valid captcha code entered") else: self.fail("Download link not found") @@ -185,20 +185,20 @@ class XFileSharingPro(SimpleHoster): wait_time = sum([int(v) * {"hour": 3600, "minute": 60, "second": 1}[u] for v, u in re.findall('(\d+)\s*(hour|minute|second)?', self.errmsg)]) self.setWait(wait_time, True) self.wait() + elif 'captcha' in self.errmsg: + self.invalidCaptcha() + elif 'premium' in self.errmsg and 'require' in self.errmsg: + self.fail("File can be downloaded by premium users only") elif 'limit' in self.errmsg: self.setWait(3600, True) self.wait() self.retry(25) - elif 'captcha' in self.errmsg: - self.invalidCaptcha() elif 'countdown' in self.errmsg or 'Expired session' in self.errmsg: self.retry(3) elif 'maintenance' in self.errmsg: self.tempOffline() elif 'download files up to' in self.errmsg: self.fail("File too large for free download") - elif 'requires premium' in self.errmsg: - self.fail("File can be downloaded by premium users only") else: self.fail(self.errmsg) @@ -211,9 +211,9 @@ class XFileSharingPro(SimpleHoster): for i in range(3): if not self.errmsg: self.checkErrors() - action, inputs = self.parseHtmlForm(self.FORM_PATTERN) + action, inputs = self.parseHtmlForm(input_names={"op": re.compile("^download")}) if not inputs: - action, inputs = self.parseHtmlForm("action=(''|\"\")") + action, inputs = self.parseHtmlForm(self.FORM_PATTERN) if not inputs: if self.errmsg: self.retry() |