From 10882cdcf116758d7cc35a72c7432a1bf4cdd15f Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Tue, 30 Oct 2012 23:57:46 +0100 Subject: update bezvadata,fastshare,dataport --- module/plugins/hoster/BezvadataCz.py | 52 ++++++++++++++++++++++++++++++------ module/plugins/hoster/DataportCz.py | 7 ++--- module/plugins/hoster/FastshareCz.py | 23 ++++++++++------ 3 files changed, 63 insertions(+), 19 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/hoster/BezvadataCz.py b/module/plugins/hoster/BezvadataCz.py index 680bbc173..37ef145b2 100644 --- a/module/plugins/hoster/BezvadataCz.py +++ b/module/plugins/hoster/BezvadataCz.py @@ -23,7 +23,7 @@ class BezvadataCz(SimpleHoster): __name__ = "BezvadataCz" __type__ = "hoster" __pattern__ = r"http://(\w*\.)*bezvadata.cz/stahnout/.*" - __version__ = "0.22" + __version__ = "0.23" __description__ = """BezvaData.cz""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") @@ -31,15 +31,51 @@ class BezvadataCz(SimpleHoster): FILE_NAME_PATTERN = r'

Soubor: (?P[^<]+)

' FILE_SIZE_PATTERN = r'
  • Velikost: (?P[^<]+)
  • ' FILE_OFFLINE_PATTERN = r'BezvaData \| Soubor nenalezen' - DOWNLOAD_FORM_PATTERN = r'
    ' + + def setup(self): + self.multiDL = self.resumeDownload = True def handleFree(self): - found = re.search(self.DOWNLOAD_FORM_PATTERN, self.html) - if found is None: self.parseError("Download form") - url = "http://bezvadata.cz" + found.group(1) - self.logDebug("Download form: %s" % url) - - self.download(url, post = {"stahnoutSoubor": "St%C3%A1hnout"}, cookies = True) + #download button + found = re.search(r'', self.html) + if not found: self.parseError("page2 URL") + url = "http://bezvadata.cz%s" % found.group(1) + self.logDebug("DL URL %s" % url) + + #countdown + found = re.search(r'id="countdown">(\d\d):(\d\d)<', self.html) + wait_time = (int(found.group(1)) * 60 + int(found.group(2)) + 1) if found else 120 + self.setWait(wait_time, False) + self.wait() + + self.download(url) + + def loadcaptcha(self, data, *args, **kwargs): + return data.decode("base64") getInfo = create_getInfo(BezvadataCz) \ No newline at end of file diff --git a/module/plugins/hoster/DataportCz.py b/module/plugins/hoster/DataportCz.py index cef115941..952824ec9 100644 --- a/module/plugins/hoster/DataportCz.py +++ b/module/plugins/hoster/DataportCz.py @@ -23,14 +23,15 @@ from pycurl import FOLLOWLOCATION class DataportCz(SimpleHoster): __name__ = "DataportCz" __type__ = "hoster" - __pattern__ = r"http://.*dataport.cz/file/.*" - __version__ = "0.35" + __pattern__ = r"http://.*dataport.cz/file/(\d+).*" + __version__ = "0.36" __description__ = """Dataport.cz plugin - free only""" __author_name__ = ("zoidberg") FILE_NAME_PATTERN = r'(?P[^<]+)' FILE_SIZE_PATTERN = r'Velikost\s*(?P[^<]+)' FILE_OFFLINE_PATTERN = r'

    Soubor nebyl nalezen

    ' + FILE_URL_REPLACEMENTS = [(__pattern__, r'http://www.dataport.cz/file/\1')] CAPTCHA_URL_PATTERN = r'
    \s*(\d+)
    ' @@ -49,7 +50,7 @@ class DataportCz(SimpleHoster): else: raise PluginParseError('captcha') - self.html = self.download("http://dataport.cz%s" % action, post = inputs) + self.html = self.download("http://www.dataport.cz%s" % action, post = inputs) check = self.checkDownload({"captcha": 'alert("\u0160patn\u011b opsan\u00fd k\u00f3d z obr\u00e1zu");', "slot": 'alert("Je n\u00e1m l\u00edto, ale moment\u00e1ln\u011b nejsou'}) diff --git a/module/plugins/hoster/FastshareCz.py b/module/plugins/hoster/FastshareCz.py index d71684166..cc0b18c96 100644 --- a/module/plugins/hoster/FastshareCz.py +++ b/module/plugins/hoster/FastshareCz.py @@ -23,14 +23,14 @@ class FastshareCz(SimpleHoster): __name__ = "FastshareCz" __type__ = "hoster" __pattern__ = r"http://(?:\w*\.)?fastshare.cz/\d+/.+" - __version__ = "0.13" + __version__ = "0.14" __description__ = """FastShare.cz""" __author_name__ = ("zoidberg") - FILE_NAME_PATTERN = r'

    (?P[^<]+)

    ' + FILE_NAME_PATTERN = r'(?P[^<]+)' FILE_SIZE_PATTERN = r'Velikost: (?P[^<]+)' - FILE_OFFLINE_PATTERN = r'
    \s*
    Tento soubor byl smazán' + SH_COOKIES = [("fastshare.cz","lang","cs")] FILE_URL_REPLACEMENTS = [('#.*','')] FREE_URL_PATTERN = ur'Stáhnout FREE.*?' @@ -38,31 +38,38 @@ class FastshareCz(SimpleHoster): NOT_ENOUGH_CREDIC_PATTERN = "Nem.te dostate.n. kredit pro sta.en. tohoto souboru" def handleFree(self): + if u">100% FREE slotů je plných.<" in self.html: + self.setWait(60, False) + self.wait() + self.retry(120, "No free slots") + found = re.search(self.FREE_URL_PATTERN, self.html) if not found: self.parseError("Free URL") action, captcha_src = found.groups() captcha = self.decryptCaptcha("http://www.fastshare.cz/" + captcha_src) self.download("http://www.fastshare.cz/" + action, post = {"code": captcha, "submit": u"stáhnout"}) - check = self.checkDownload({"paralell_dl": "