diff options
Diffstat (limited to 'pyload/plugin/hoster/CzshareCom.py')
-rw-r--r-- | pyload/plugin/hoster/CzshareCom.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/pyload/plugin/hoster/CzshareCom.py b/pyload/plugin/hoster/CzshareCom.py index 3bf371508..70766d6fc 100644 --- a/pyload/plugin/hoster/CzshareCom.py +++ b/pyload/plugin/hoster/CzshareCom.py @@ -12,9 +12,10 @@ from pyload.utils import parseFileSize class CzshareCom(SimpleHoster): __name__ = "CzshareCom" __type__ = "hoster" - __version__ = "0.98" + __version__ = "0.99" __pattern__ = r'http://(?:www\.)?(czshare|sdilej)\.(com|cz)/(\d+/|download\.php\?).+' + __config__ = [("use_premium", "bool", "Use premium account if available", True)] __description__ = """CZshare.com hoster plugin, now Sdilej.cz""" __license__ = "GPLv3" @@ -43,7 +44,7 @@ class CzshareCom(SimpleHoster): m = re.search(self.USER_CREDIT_PATTERN, self.html) if m is None: self.account.relogin(self.user) - self.html = self.load(self.pyfile.url, cookies=True, decode=True) + self.html = self.load(self.pyfile.url, decode=True) m = re.search(self.USER_CREDIT_PATTERN, self.html) if m is None: return False @@ -87,7 +88,7 @@ class CzshareCom(SimpleHoster): self.logDebug("PARSED_URL:" + parsed_url) # get download ticket and parse html - self.html = self.load(parsed_url, cookies=True, decode=True) + self.html = self.load(parsed_url, decode=True) if re.search(self.MULTIDL_PATTERN, self.html): self.longWait(5 * 60, 12) @@ -104,7 +105,7 @@ class CzshareCom(SimpleHoster): captcha_url = 'http://sdilej.cz/captcha.php' for _i in xrange(5): inputs['captchastring2'] = self.decryptCaptcha(captcha_url) - self.html = self.load(parsed_url, cookies=True, post=inputs, decode=True) + self.html = self.load(parsed_url, post=inputs, decode=True) if u"<li>Zadaný ověřovací kód nesouhlasí!</li>" in self.html: self.invalidCaptcha() @@ -133,7 +134,7 @@ class CzshareCom(SimpleHoster): self.wait() - def checkFile(self): + def checkFile(self, rules={}): # check download check = self.checkDownload({ "temp offline" : re.compile(r"^Soubor je do.*asn.* nedostupn.*$"), @@ -155,4 +156,4 @@ class CzshareCom(SimpleHoster): self.invalidCaptcha() self.retry() - return super(CzshareCom, self).checkFile() + return super(CzshareCom, self).checkFile(rules) |