diff options
| author | 2015-04-30 19:44:58 +0200 | |
|---|---|---|
| committer | 2015-04-30 19:44:58 +0200 | |
| commit | 6305978099142fbe306d308877946c570fb4e98f (patch) | |
| tree | 4264f9e17179e2aa26775c6dd448576d6c628ddf | |
| parent | Revert colored console (diff) | |
| parent | Spare code cosmetics (diff) | |
| download | pyload-6305978099142fbe306d308877946c570fb4e98f.tar.xz | |
Merge branch 'stable' into 0.4.10
Conflicts:
	pyload/plugin/crypter/FilecryptCc.py
	pyload/plugin/hoster/Ftp.py
	pyload/plugin/hoster/UpleaCom.py
	pyload/plugin/hoster/UploadedTo.py
	pyload/plugin/internal/BasePlugin.py
	pyload/plugin/internal/SimpleHoster.py
| -rw-r--r-- | pyload/plugin/crypter/FilecryptCc.py | 15 | ||||
| -rw-r--r-- | pyload/plugin/hoster/Ftp.py | 2 | ||||
| -rw-r--r-- | pyload/plugin/hoster/UpleaCom.py | 22 | ||||
| -rw-r--r-- | pyload/plugin/hoster/UploadedTo.py | 4 | ||||
| -rw-r--r-- | pyload/plugin/internal/BasePlugin.py | 2 | ||||
| -rw-r--r-- | pyload/plugin/internal/SimpleHoster.py | 2 | 
6 files changed, 28 insertions, 19 deletions
| diff --git a/pyload/plugin/crypter/FilecryptCc.py b/pyload/plugin/crypter/FilecryptCc.py index 52242902e..33862164a 100644 --- a/pyload/plugin/crypter/FilecryptCc.py +++ b/pyload/plugin/crypter/FilecryptCc.py @@ -16,7 +16,7 @@ from pyload.plugin.captcha.ReCaptcha import ReCaptcha  class FilecryptCc(Crypter):      __name    = "FilecryptCc"      __type    = "crypter" -    __version = "0.11" +    __version = "0.14"      __pattern = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+' @@ -33,7 +33,7 @@ class FilecryptCc(Crypter):      CAPTCHA_PATTERN        = r'<img id="nc" src="(.+?)"'      CIRCLE_CAPTCHA_PATTERN = r'<input type="image" src="(.+?)"' -    MIRROR_PAGE_PATTERN = r'"[\w]*" href="(http://filecrypt.cc/Container/\w+\.html\?mirror=\d+)">' +    MIRROR_PAGE_PATTERN = r'"[\w]*" href="(https?://(?:www\.)?filecrypt.cc/Container/\w+\.html\?mirror=\d+)">'      def setup(self): @@ -42,6 +42,7 @@ class FilecryptCc(Crypter):      def decrypt(self, pyfile):          self.html = self.load(pyfile.url) +        self.base_url = self.pyfile.url.split("Container")[0]          if "content notfound" in self.html:  #@NOTE: "content notfound" is NOT a typo              self.offline() @@ -90,7 +91,7 @@ class FilecryptCc(Crypter):          if m:  #: normal captcha              self.logDebug("Captcha-URL: %s" % m.group(1)) -            captcha_code = self.decryptCaptcha(urljoin("http://filecrypt.cc", m.group(1)), +            captcha_code = self.decryptCaptcha(urljoin(self.base_url, m.group(1)),                                                 forceUser=True,                                                 imgtype="gif") @@ -100,9 +101,7 @@ class FilecryptCc(Crypter):          elif m2:  #: circle captcha              self.logDebug("Captcha-URL: %s" % m2.group(1)) -            captcha_code = self.decryptCaptcha(urljoin("http://filecrypt.cc", m2.group(1)), -                                               forceUser=True, -                                               imgtype="gif", +            captcha_code = self.decryptCaptcha('%s%s?c=abc' %(self.base_url, m2.group(1)),                                                 result_type='positional')              self.siteWithLinks = self.load(self.pyfile.url, @@ -134,7 +133,7 @@ class FilecryptCc(Crypter):              return          for i in dlc: -            self.links.append("http://filecrypt.cc/DLC/%s.dlc" % i) +            self.links.append("%s/DLC/%s.dlc" % (self.base_url, i))      def handleWeblinks(self): @@ -142,7 +141,7 @@ class FilecryptCc(Crypter):              weblinks = re.findall(self.WEBLINK_PATTERN, self.siteWithLinks)              for link in weblinks: -                res   = self.load("http://filecrypt.cc/Link/%s.html" % link) +                res   = self.load("%s/Link/%s.html" % (self.base_url, link))                  link2 = re.search('<iframe noresize src="(.*)"></iframe>', res)                  res2  = self.load(link2.group(1), just_header=True)                  self.links.append(res2['location']) diff --git a/pyload/plugin/hoster/Ftp.py b/pyload/plugin/hoster/Ftp.py index 86049df04..1ebfdebd0 100644 --- a/pyload/plugin/hoster/Ftp.py +++ b/pyload/plugin/hoster/Ftp.py @@ -12,7 +12,7 @@ from pyload.plugin.Hoster import Hoster  class Ftp(Hoster):      __name    = "Ftp"      __type    = "hoster" -    __version = "0.49" +    __version = "0.50"      __pattern = r'(?:ftps?|sftp)://([\w.-]+(:[\w.-]+)?@)?[\w.-]+(:\d+)?/.+' diff --git a/pyload/plugin/hoster/UpleaCom.py b/pyload/plugin/hoster/UpleaCom.py index 46462e94a..fe2aa036e 100644 --- a/pyload/plugin/hoster/UpleaCom.py +++ b/pyload/plugin/hoster/UpleaCom.py @@ -10,24 +10,31 @@ from pyload.plugin.internal.XFSHoster import XFSHoster  class UpleaCom(XFSHoster):      __name    = "UpleaCom"      __type    = "hoster" -    __version = "0.06" +    __version = "0.10"      __pattern = r'https?://(?:www\.)?uplea\.com/dl/\w{15}'      __description = """Uplea.com hoster plugin"""      __license     = "GPLv3" -    __authors     = [("Redleon", "")] +    __authors     = [("Redleon", None), +                     ("GammaC0de", None)] -    NAME_PATTERN = r'class="agmd size18">(?P<N>.+?)<' -    SIZE_PATTERN = r'size14">(?P<S>[\d.,]+) (?P<U>[\w^_])</span>' +    DISPOSITION = False  #@TODO: Remove in 0.4.10 +    HOSTER_DOMAIN = "uplea.com" + +    SIZE_REPLACEMENTS = [('ko','KB'), ('mo','MB'), ('go','GB'), ('Ko','KB'), ('Mo','MB'), ('Go','GB')] + +    NAME_PATTERN    = r'<span class="gold-text">(?P<N>.+?)</span>' +    SIZE_PATTERN    = r'<span class="label label-info agmd">(?P<S>[\d.,]+) (?P<U>[\w^_]+?)</span>'      OFFLINE_PATTERN = r'>You followed an invalid or expired link' -    LINK_PATTERN = r'"(http?://\w+\.uplea\.com/anonym/.*?)"' +    LINK_PATTERN = r'"(https?://\w+\.uplea\.com/anonym/.*?)"' -    WAIT_PATTERN = r'timeText:([\d.]+),' -    STEP_PATTERN = r'<a href="(/step/.+)">' +    PREMIUM_ONLY_PATTERN = r'You need to have a Premium subscription to download this file' +    WAIT_PATTERN         = r'timeText: ?([\d.]+),' +    STEP_PATTERN         = r'<a href="(/step/.+)">'      def setup(self): @@ -45,6 +52,7 @@ class UpleaCom(XFSHoster):          m = re.search(self.WAIT_PATTERN, self.html)          if m: +            self.logDebug(_("Waiting %s seconds") % m.group(1))              self.wait(m.group(1), True)              self.retry() diff --git a/pyload/plugin/hoster/UploadedTo.py b/pyload/plugin/hoster/UploadedTo.py index c8b201ec6..308b7c1ca 100644 --- a/pyload/plugin/hoster/UploadedTo.py +++ b/pyload/plugin/hoster/UploadedTo.py @@ -11,7 +11,7 @@ from pyload.plugin.internal.SimpleHoster import SimpleHoster  class UploadedTo(SimpleHoster):      __name    = "UploadedTo"      __type    = "hoster" -    __version = "0.86" +    __version = "0.87"      __pattern = r'https?://(?:www\.)?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P<ID>\w+)'      __config  = [("use_premium", "bool", "Use premium account if available", True)] @@ -27,6 +27,8 @@ class UploadedTo(SimpleHoster):      URL_REPLACEMENTS = [(__pattern + ".*", r'http://uploaded.net/file/\g<ID>')] +    TEMP_OFFLINE_PATTERN = r'<title>uploaded\.net - Maintenance' +      LINK_PREMIUM_PATTERN = r'<div class="tfree".*\s*<form method="post" action="(.+?)"'      WAIT_PATTERN   = r'Current waiting period: <span>(\d+)' diff --git a/pyload/plugin/internal/BasePlugin.py b/pyload/plugin/internal/BasePlugin.py index 996dc8e76..c5fbde8bb 100644 --- a/pyload/plugin/internal/BasePlugin.py +++ b/pyload/plugin/internal/BasePlugin.py @@ -13,7 +13,7 @@ from pyload.plugin.Hoster import Hoster  class BasePlugin(Hoster):      __name    = "BasePlugin"      __type    = "hoster" -    __version = "0.41" +    __version = "0.42"      __pattern = r'^unmatchable$' diff --git a/pyload/plugin/internal/SimpleHoster.py b/pyload/plugin/internal/SimpleHoster.py index 75970d814..8b53559e7 100644 --- a/pyload/plugin/internal/SimpleHoster.py +++ b/pyload/plugin/internal/SimpleHoster.py @@ -244,7 +244,7 @@ def secondsToMidnight(gmt=0):  class SimpleHoster(Hoster):      __name    = "SimpleHoster"      __type    = "hoster" -    __version = "1.38" +    __version = "1.39"      __pattern = r'^unmatchable$'      __config  = [("use_premium", "bool", "Use premium account if available", True)] | 
