# -*- coding: utf-8 -*- import re from module.plugins.internal.SimpleHoster import SimpleHoster class EuroshareEu(SimpleHoster): __name__ = "EuroshareEu" __type__ = "hoster" __version__ = "0.38" __status__ = "testing" __pattern__ = r'http://(?:www\.)?euroshare\.(eu|sk|cz|hu|pl)/file/.+' __config__ = [("activated" , "bool", "Activated" , True), ("use_premium" , "bool", "Use premium account if available" , True), ("fallback" , "bool", "Fallback to free download if premium fails" , True), ("chk_filesize", "bool", "Check file size" , True), ("max_wait" , "int" , "Reconnect if waiting time is greater than minutes", 10 )] __description__ = """Euroshare.eu hoster plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz" ), ("GammaC0de", "nitzo2001[AT]yahoo[DOT]com")] NAME_PATTERN = r'
Naraz je z jednej IP adresy mo.n. s.ahova. iba jeden s.bor' ERROR_PATTERN = r'href="/customer-zone/login/"' URL_REPLACEMENTS = [(r'(http://[^/]*\.)(sk|cz|hu|pl)/', r'\1eu/')] def setup(self): self.resume_download = True def handle_free(self, pyfile): if re.search(self.DL_LIMIT_PATTERN, self.data): self.wait(5 * 60, 12, _("Download limit reached")) self.data = self.load(pyfile.url, get={'download': "true"}) m = re.search(self.LINK_PATTERN, self.data) if m is None: self.error(_("LINK_PATTERN not found")) self.link = m.group(1)