From 472870794ba8a9706f82cd79a22c2d959e5c2626 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Sat, 3 Nov 2012 18:06:19 +0100 Subject: update plugins - easybytez,filefactory,rusfolder,euroshare --- module/plugins/hoster/BezvadataCz.py | 69 ++++++++++++++++++++------------- module/plugins/hoster/DataportCz.py | 4 +- module/plugins/hoster/EasybytezCom.py | 3 +- module/plugins/hoster/EuroshareEu.py | 22 ++++++++++- module/plugins/hoster/FilefactoryCom.py | 8 ++-- module/plugins/hoster/HotfileCom.py | 4 +- module/plugins/hoster/IfolderRu.py | 10 ++--- 7 files changed, 77 insertions(+), 43 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/hoster/BezvadataCz.py b/module/plugins/hoster/BezvadataCz.py index 37ef145b2..cb9bae07c 100644 --- a/module/plugins/hoster/BezvadataCz.py +++ b/module/plugins/hoster/BezvadataCz.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- """ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,7 +23,7 @@ class BezvadataCz(SimpleHoster): __name__ = "BezvadataCz" __type__ = "hoster" __pattern__ = r"http://(\w*\.)*bezvadata.cz/stahnout/.*" - __version__ = "0.23" + __version__ = "0.24" __description__ = """BezvaData.cz""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") @@ -31,51 +31,64 @@ class BezvadataCz(SimpleHoster): FILE_NAME_PATTERN = r'

Soubor: (?P[^<]+)

' FILE_SIZE_PATTERN = r'
  • Velikost: (?P[^<]+)
  • ' FILE_OFFLINE_PATTERN = r'BezvaData \| Soubor nenalezen' - + def setup(self): self.multiDL = self.resumeDownload = True def handleFree(self): - #download button + #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 + 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) - + + self.download(url) + + def checkErrors(self): + if 'images/button-download-disable.png' in self.html: + self.longWait(300, 24) #parallel dl limit + elif '
    Download Link\s*]*>([^<]+)' OVR_KILL_LINK_PATTERN = r'

    Delete Link

    \s*]*>([^<]+)' + ERROR_PATTERN = r'(?:class=["\']err["\'][^>]*>|
    )(.*?)
    Prebieha s.ahovanie|

    Naraz je z jednej IP adresy mo.n. s.ahova. iba jeden s.bor' + ERR_NOT_LOGGED_IN_PATTERN = r'href="/customer-zone/login/"' FILE_URL_REPLACEMENTS = [(r"(http://[^/]*\.)(sk|cz|hu|pl)/", r"\1eu/")] + def setup(self): + self.multiDL = self.resumeDownload = self.premium + self.req.setOption("timeout", 120) + def handlePremium(self): - self.download(self.pyfile.url.rstrip('/') + "/download/") + if self.ERR_NOT_LOGGED_IN_PATTERN in self.html: + self.account.relogin(user) + self.retry() + + self.download(self.pyfile.url.rstrip('/') + "/download/") + + check = self.checkDownload({"login": re.compile(self.ERR_NOT_LOGGED_IN_PATTERN), + "json": re.compile(r'\{"status":"error".*?"message":"(.*?)"') + }) + if check == "login" or (check == "json" and self.lastCheck.group(1) == "Access token expired"): + self.account.relogin(user) + self.retry() + elif check == "json": + self.fail(self.lastCheck.group(1)) def handleFree(self): if re.search(self.ERR_PARDL_PATTERN, self.html) is not None: diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index 135dd90a1..0cd60ce85 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -35,7 +35,7 @@ class FilefactoryCom(Hoster): __name__ = "FilefactoryCom" __type__ = "hoster" __pattern__ = r"http://(?:www\.)?filefactory\.com/file/(?P[a-zA-Z0-9]+).*" # URLs given out are often longer but this is the requirement - __version__ = "0.34" + __version__ = "0.35" __description__ = """Filefactory.Com File Download Hoster""" __author_name__ = ("paulking", "zoidberg") @@ -112,13 +112,15 @@ class FilefactoryCom(Hoster): self.invalidCaptcha() else: self.fail("No valid captcha after 5 attempts") - + # This will take us to a wait screen waiturl = "http://www.filefactory.com" + response['path'] self.logDebug("Fetching wait with url [%s]" % waiturl) waithtml = self.load(waiturl, decode=True) + found = re.search(r'\d+).*" - __version__ = "0.36" + __pattern__ = r"http://(?:[^.]*\.)?(?:ifolder\.ru|rusfolder\.(?:com|net|ru))/(?:files/)?(?P\d+).*" + __version__ = "0.37" __description__ = """rusfolder.com / ifolder.ru""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") @@ -50,7 +50,7 @@ class IfolderRu(SimpleHoster): self.html = self.load("http://rusfolder.com/%s" % file_id, cookies=True, decode=True) self.getFileInfo() - url = "http://ints.rusfolder.com/ints/?rusfolder.com/%s?ints_code=" % file_id + url = re.search('