diff options
Diffstat (limited to 'module/plugins')
| -rw-r--r-- | module/plugins/Container.py | 12 | ||||
| -rw-r--r-- | module/plugins/captcha/captcha.py | 4 | ||||
| -rw-r--r-- | module/plugins/container/DLC_25.pyc | bin | 6051 -> 7765 bytes | |||
| -rw-r--r-- | module/plugins/container/DLC_26.pyc | bin | 6051 -> 7757 bytes | |||
| -rw-r--r-- | module/plugins/crypter/SerienjunkiesOrg.py | 17 | ||||
| -rw-r--r-- | module/plugins/hoster/MegauploadCom.py | 2 | ||||
| -rw-r--r-- | module/plugins/hoster/ShareonlineBiz.py | 26 | 
7 files changed, 43 insertions, 18 deletions
| diff --git a/module/plugins/Container.py b/module/plugins/Container.py index 2a7196f14..794c52508 100644 --- a/module/plugins/Container.py +++ b/module/plugins/Container.py @@ -27,3 +27,15 @@ class Container(Plugin):      __description__ = """Base container plugin"""      __author_name__ = ("mkaay")      __author_mail__ = ("mkaay@mkaay.de") +     +    def decrypt(self): +        pass +     +    def createNewPackage(self): +        return False +     +    def getPackages(self): +        return [] +     +    def getLinks(self): +        return [] diff --git a/module/plugins/captcha/captcha.py b/module/plugins/captcha/captcha.py index eec63b54f..db229c747 100644 --- a/module/plugins/captcha/captcha.py +++ b/module/plugins/captcha/captcha.py @@ -22,6 +22,7 @@ import logging  import subprocess  import tempfile  import threading +from os import remove  import Image @@ -105,7 +106,8 @@ class OCR(object):              tmpSub.write("\n")              tessparams.append("nobatch")              tessparams.append(tmpSub.name) - +            tmpSub.flush() +                      self.logger.debug("run tesseract")          self.run(tessparams)          self.logger.debug("read txt") diff --git a/module/plugins/container/DLC_25.pyc b/module/plugins/container/DLC_25.pycBinary files differ index 16833d37a..a2f396dc6 100644 --- a/module/plugins/container/DLC_25.pyc +++ b/module/plugins/container/DLC_25.pyc diff --git a/module/plugins/container/DLC_26.pyc b/module/plugins/container/DLC_26.pycBinary files differ index 74947a504..feda85a9a 100644 --- a/module/plugins/container/DLC_26.pyc +++ b/module/plugins/container/DLC_26.pyc diff --git a/module/plugins/crypter/SerienjunkiesOrg.py b/module/plugins/crypter/SerienjunkiesOrg.py index af95a9c78..6733be2bb 100644 --- a/module/plugins/crypter/SerienjunkiesOrg.py +++ b/module/plugins/crypter/SerienjunkiesOrg.py @@ -8,17 +8,16 @@ from module.unescape import unescape  from module.DownloadThread import CaptchaError  class SerienjunkiesOrg(Plugin): +    __name__ = "SerienjunkiesOrg" +    __type__ = "container" +    __pattern__ = r"http://.*?serienjunkies.org/.*?" +    __version__ = "0.2" +    __description__ = """serienjunkies.org Container Plugin""" +    __author_name__ = ("mkaay") +    __author_mail__ = ("mkaay@mkaay.de") +              def __init__(self, parent):          Plugin.__init__(self, parent) -        props = {} -        props['name'] = "SerienjunkiesOrg" -        props['type'] = "container" -        props['pattern'] = r"http://.*?serienjunkies.org/.*?" -        props['version'] = "0.2" -        props['description'] = """serienjunkies.org Container Plugin""" -        props['author_name'] = ("mkaay") -        props['author_mail'] = ("mkaay@mkaay.de") -        self.props = props          self.parent = parent          self.html = None          self.multi_dl = False diff --git a/module/plugins/hoster/MegauploadCom.py b/module/plugins/hoster/MegauploadCom.py index 10c3ec370..a3c64c124 100644 --- a/module/plugins/hoster/MegauploadCom.py +++ b/module/plugins/hoster/MegauploadCom.py @@ -11,7 +11,7 @@ from module.plugins.Hoster import Hoster  class MegauploadCom(Hoster):      __name__ = "MegauploadCom"      __type__ = "hoster" -    __pattern__ = r"http://(?:www.)megaupload.com/" +    __pattern__ = r"http://[\w\.]*?(megaupload)\.com/.*?(\?|&)d=[0-9A-Za-z]+"      __version__ = "0.1"      __description__ = """Megaupload.com Download Hoster"""      __author_name__ = ("spoob") diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py index 9cc0f8263..13d240bb4 100644 --- a/module/plugins/hoster/ShareonlineBiz.py +++ b/module/plugins/hoster/ShareonlineBiz.py @@ -39,7 +39,12 @@ class ShareonlineBiz(Hoster):          self.download_api_data()          if self.api_data["status"]: -            self.download_html() +            for i in range(5): +                if self.download_html(): +                    break +                else: +                    pyfile.status.waituntil = self.time_plus_wait +                    thread.wait(self.pyfile)              pyfile.status.filename = self.api_data["filename"]              pyfile.status.waituntil = self.time_plus_wait              pyfile.status.url = self.get_file_url() @@ -84,18 +89,25 @@ class ShareonlineBiz(Hoster):              for i in range(10): -                captcha_image = tempfile.NamedTemporaryFile(suffix=".jpg").name -                self.download("http://www.share-online.biz/captcha.php?rand="+ "0." + str(random.randint(10**15,10**16)), captcha_image, cookies=True) -                captcha = self.ocr.get_captcha(captcha_image) -                os.remove(captcha_image) -                self.logger.debug("Captcha %s: %s" % (i, captcha)) +                captcha_image = tempfile.NamedTemporaryFile(suffix=".jpg", delete=False) +                imgStr = self.req.load("http://www.share-online.biz/captcha.php?rand="+ "0." + str(random.randint(10**15,10**16)), cookies=True) +                captcha_image.write(imgStr) +                captcha_image.close() +                captcha = self.ocr.get_captcha(captcha_image.name) +                os.remove(captcha_image.name) +                self.logger.debug("%s Captcha %s: %s" % (self.__name__, i, captcha))                  sleep(3)                  self.html[1] = self.load(url, post={"captchacode": captcha}, cookies=True) -                if re.search(r"Der Download ist Ihnen zu langsam", self.html[1]) != None: +                if re.search(r"no slots available", self.html[1]): +                    self.time_plus_wait = time() + 60 +                    return False +                if re.search(r"Der Download ist Ihnen zu langsam", self.html[1]):                      self.time_plus_wait = time() + 15                      return True              raise Exception("Captcha not decrypted") +        else: +            return True      def get_file_url(self):          """ returns the absolute downloadable filepath | 
