# -*- coding: utf-8 -*- import re from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class BezvadataCz(SimpleHoster): __name__ = "BezvadataCz" __type__ = "hoster" __version__ = "0.32" __status__ = "testing" __pattern__ = r'http://(?:www\.)?bezvadata\.cz/stahnout/.+' __config__ = [("activated" , "bool", "Activated" , True), ("use_premium", "bool", "Use premium account if available", True)] __description__ = """BezvaData.cz hoster plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] NAME_PATTERN = r'

Soubor: (?P[^<]+)

' SIZE_PATTERN = r'
  • Velikost: (?P[^<]+)
  • ' OFFLINE_PATTERN = r'BezvaData \| Soubor nenalezen' def setup(self): self.resume_download = True self.multiDL = True def handle_free(self, pyfile): #: Download button m = re.search(r'', self.data) if m is None: self.error(_("Page 2 URL not found")) url = "http://bezvadata.cz%s" % m.group(1) self.log_debug("DL URL %s" % url) #: countdown m = re.search(r'id="countdown">(\d\d):(\d\d)<', self.data) wait_time = (int(m.group(1)) * 60 + int(m.group(2))) if m else 120 self.wait(wait_time, False) self.link = url def check_errors(self): if 'images/button-download-disable.png' in self.data: self.wait(5 * 60, 24, _("Download limit reached")) #: Parallel dl limit elif '