diff options
Diffstat (limited to 'module/plugins/hoster/EuroshareEu.py')
-rw-r--r-- | module/plugins/hoster/EuroshareEu.py | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py index 2c356f02a..79df56ac4 100644 --- a/module/plugins/hoster/EuroshareEu.py +++ b/module/plugins/hoster/EuroshareEu.py @@ -23,7 +23,7 @@ class EuroshareEu(SimpleHoster): __name__ = "EuroshareEu" __type__ = "hoster" __pattern__ = r"http://(\w*\.)?euroshare.(eu|sk|cz|hu|pl)/file/.*" - __version__ = "0.21" + __version__ = "0.22" __description__ = """Euroshare.eu""" __author_name__ = ("zoidberg") @@ -31,11 +31,16 @@ class EuroshareEu(SimpleHoster): FILE_OFFLINE_PATTERN = ur'<h2>S.bor sa nena.iel</h2>|Požadovaná stránka neexistuje!' FREE_URL_PATTERN = r'<a href="(/file/\d+/[^/]*/download/)"><div class="downloadButton"' - ERR_PARDL_PATTERN = r'<h2>Prebieha s.ahovanie</h2>' + ERR_PARDL_PATTERN = r'<h2>Prebieha s.ahovanie</h2>|<p>Naraz je z jednej IP adresy mo.n. s.ahova. iba jeden s.bor' + + FILE_URL_REPLACEMENTS = [(r"(http://[^/]*\.)(sk|cz|hu|pl)/", r"\1eu/")] + + def handlePremium(self): + self.download(self.pyfile.url.rstrip('/') + "/download/") def handleFree(self): if re.search(self.ERR_PARDL_PATTERN, self.html) is not None: - self.waitForFreeSlot() + self.longWait(300, 12) found = re.search(self.FREE_URL_PATTERN, self.html) if found is None: @@ -43,8 +48,9 @@ class EuroshareEu(SimpleHoster): parsed_url = "http://euroshare.eu%s" % found.group(1) self.logDebug("URL", parsed_url) self.download(parsed_url, disposition=True) - - def waitForFreeSlot(self): - self.setWait(300, True) - self.wait() - self.retry()
\ No newline at end of file + + check = self.checkDownload({"multi_dl": re.compile(self.ERR_PARDL_PATTERN)}) + if check == "multi_dl": + self.longWait(300, 12) + +getInfo = create_getInfo(EuroshareEu)
\ No newline at end of file |