diff options
Diffstat (limited to 'module/plugins')
| -rw-r--r-- | module/plugins/crypter/ShareLinksBiz.py | 9 | ||||
| -rw-r--r-- | module/plugins/hoster/Keep2ShareCc.py | 20 | ||||
| -rw-r--r-- | module/plugins/hoster/UpleaCom.py | 12 | ||||
| -rw-r--r-- | module/plugins/internal/CaptchaService.py | 2 | 
4 files changed, 31 insertions, 12 deletions
| diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index e359bbeab..80aeb430a 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -11,7 +11,7 @@ from module.plugins.internal.Crypter import Crypter, create_getInfo  class ShareLinksBiz(Crypter):      __name__    = "ShareLinksBiz"      __type__    = "crypter" -    __version__ = "1.20" +    __version__ = "1.21"      __status__  = "testing"      __pattern__ = r'http://(?:www\.)?(share-links|s2l)\.biz/(?P<ID>_?\w+)' @@ -71,7 +71,12 @@ class ShareLinksBiz(Crypter):          url = pyfile.url          if 's2l.biz' in url: -            url = self.load(url, just_header=True)['location'] +            header = self.load(url, just_header=True) +             +            if not 'location' in header: +                self.fail(_("Unable to initialize download")) +            else: +                url = header.get('location')          if re.match(self.__pattern__, url):              self.base_url = "http://www.%s.biz" % re.match(self.__pattern__, url).group(1) diff --git a/module/plugins/hoster/Keep2ShareCc.py b/module/plugins/hoster/Keep2ShareCc.py index c927ea11c..1dba9713a 100644 --- a/module/plugins/hoster/Keep2ShareCc.py +++ b/module/plugins/hoster/Keep2ShareCc.py @@ -11,7 +11,7 @@ class Keep2ShareCc(SimpleHoster):      __name__    = "Keep2ShareCc"      __type__    = "hoster"      __version__ = "0.28" -    __status__  = "broken" +    __status__  = "testing"      __pattern__ = r'https?://(?:www\.)?(keep2share|k2s|keep2s)\.cc/file/(?P<ID>\w+)'      __config__  = [("activated"   , "bool", "Activated"                                        , True), @@ -34,8 +34,9 @@ class Keep2ShareCc(SimpleHoster):      OFFLINE_PATTERN      = r'File not found or deleted|Sorry, this file is blocked or deleted|Error 404'      TEMP_OFFLINE_PATTERN = r'Downloading blocked due to' -    LINK_FREE_PATTERN    = r'"(.+?url.html\?file=.+?)"|window\.location\.href = \'(.+?)\';' +    LINK_FREE_PATTERN    = r'"([^"]+?url.html\?file=.+?)"|window\.location\.href = \'(.+?)\';'      LINK_PREMIUM_PATTERN = r'window\.location\.href = \'(.+?)\';' +    UNIQUE_ID_PATTERN    = r"data: {uniqueId: '(?P<uID>\w+)', free: 1}"      CAPTCHA_PATTERN = r'src="(/file/captcha\.html.+?)"' @@ -68,6 +69,7 @@ class Keep2ShareCc(SimpleHoster):              self.retry(wait=wait_time, msg="Please wait to download this file")          self.info.pop('error', None) +        # super(Keep2ShareCc, self).check_errors()      def handle_free(self, pyfile): @@ -83,13 +85,22 @@ class Keep2ShareCc(SimpleHoster):          if m is None:              self.handle_captcha()              self.wait(31) -            self.data = self.load(pyfile.url) +            # get the uniqueId from the html code +            m = re.search(self.UNIQUE_ID_PATTERN, self.data) +            if m is None: +                self.error(_("Unique-ID pattern not found")) +            self.data = self.load(pyfile.url, post={'uniqueId': m.group('uID'), 'free': '1'})              m = re.search(self.LINK_FREE_PATTERN, self.data)              if m is None:                  self.error(_("Free download link not found")) -        self.link = m.group(1) +        # if group 1 did not match, check group 2 +        if m.group(1) is not None: +            self.link = m.group(1) +        else: +            self.link = m.group(2) +        self.log_debug("download link: %s" % self.link)      def handle_captcha(self): @@ -121,3 +132,4 @@ class Keep2ShareCc(SimpleHoster):  getInfo = create_getInfo(Keep2ShareCc) + diff --git a/module/plugins/hoster/UpleaCom.py b/module/plugins/hoster/UpleaCom.py index d1656556b..c552adc0f 100644 --- a/module/plugins/hoster/UpleaCom.py +++ b/module/plugins/hoster/UpleaCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo  class UpleaCom(XFSHoster):      __name__    = "UpleaCom"      __type__    = "hoster" -    __version__ = "0.15" +    __version__ = "0.16"      __status__  = "testing"      __pattern__ = r'https?://(?:www\.)?uplea\.com/dl/\w{15}' @@ -36,7 +36,7 @@ class UpleaCom(XFSHoster):      LINK_PATTERN = r'"(https?://\w+\.uplea\.com/anonym/.*?)"'      PREMIUM_ONLY_PATTERN = r'You need to have a Premium subscription to download this file' -    WAIT_PATTERN         = r'timeText: ?([\d.]+),' +    WAIT_PATTERN         = r'timeText: ?(\d+),'      STEP_PATTERN         = r'<a href="(/step/.+)">' @@ -54,8 +54,7 @@ class UpleaCom(XFSHoster):          self.data = self.load(urlparse.urljoin("http://uplea.com/", m.group(1)))          m = re.search(self.WAIT_PATTERN, self.data) -        if m is not None: -            self.log_debug("Waiting %s seconds" % m.group(1)) +        if m:              self.wait(m.group(1), True)              self.retry() @@ -64,7 +63,10 @@ class UpleaCom(XFSHoster):              self.error(_("LINK_PATTERN not found"))          self.link = m.group(1) -        self.wait(15) + +        m = re.search(r".ulCounter\({'timer':(\d+)}\)", self.data) +        if m: +            self.wait(m.group(1))  getInfo = create_getInfo(UpleaCom) diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py index b3f7841f0..397f4f750 100644 --- a/module/plugins/internal/CaptchaService.py +++ b/module/plugins/internal/CaptchaService.py @@ -6,7 +6,7 @@ from module.plugins.internal.Captcha import Captcha  class CaptchaService(Captcha):      __name__    = "CaptchaService"      __type__    = "captcha" -    __version__ = "0.33" +    __version__ = "0.34"      __status__  = "stable"      __description__ = """Base anti-captcha service plugin""" | 
