diff options
Diffstat (limited to 'pyload')
| -rw-r--r-- | pyload/plugins/addon/SkipRev.py | 8 | ||||
| -rw-r--r-- | pyload/plugins/hoster/FastshareCz.py | 5 | ||||
| -rw-r--r-- | pyload/plugins/hoster/FileSharkPl.py | 4 | ||||
| -rw-r--r-- | pyload/plugins/hoster/FilerNet.py | 15 | ||||
| -rw-r--r-- | pyload/plugins/hoster/Keep2shareCc.py | 25 | 
5 files changed, 25 insertions, 32 deletions
| diff --git a/pyload/plugins/addon/SkipRev.py b/pyload/plugins/addon/SkipRev.py index 5bef21d94..90544959e 100644 --- a/pyload/plugins/addon/SkipRev.py +++ b/pyload/plugins/addon/SkipRev.py @@ -10,7 +10,7 @@ from pyload.plugins.Plugin import SkipDownload  class SkipRev(Adoon):      __name    = "SkipRev"      __type    = "addon" -    __version = "0.14" +    __version = "0.15"      __config = [("tokeep", "int", "Number of rev files to keep for package (-1 to auto)", -1)] @@ -32,10 +32,10 @@ class SkipRev(Adoon):          if hasattr(plugin, "info") and 'name' in plugin.info and plugin.info['name']:              name = plugin.info['name'] -        elif hasattr(plugin, "parseInfo"): -            name = next(plugin.parseInfo([url]))['name'] +        elif hasattr(plugin, "parseInfos"): +            name = next(plugin.parseInfos([url]))['name'] -        elif hasattr(plugin, "getInfo"):  #@NOTE: if parseInfo was not found, getInfo should be missing too +        elif hasattr(plugin, "getInfo"):  #@NOTE: if parseInfos was not found, getInfo should be missing too              name = plugin.getInfo(url)['name']          else: diff --git a/pyload/plugins/hoster/FastshareCz.py b/pyload/plugins/hoster/FastshareCz.py index 4e2da7f76..3714e1bc2 100644 --- a/pyload/plugins/hoster/FastshareCz.py +++ b/pyload/plugins/hoster/FastshareCz.py @@ -10,7 +10,7 @@ from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo  class FastshareCz(SimpleHoster):      __name    = "FastshareCz"      __type    = "hoster" -    __version = "0.24" +    __version = "0.25"      __pattern = r'http://(?:www\.)?fastshare\.cz/\d+/.+' @@ -20,8 +20,7 @@ class FastshareCz(SimpleHoster):      URL_REPLACEMENTS = [("#.*", "")] -    COOKIES             = [("fastshare.cz", "lang", "en")] -    CONTENT_DISPOSITION = True +    COOKIES = [("fastshare.cz", "lang", "en")]      INFO_PATTERN    = r'<h1 class="dwp">(?P<N>[^<]+)</h1>\s*<div class="fileinfo">\s*Size\s*: (?P<S>\d+) (?P<U>[\w^_]+),'      OFFLINE_PATTERN = r'>(The file has been deleted|Requested page not found)' diff --git a/pyload/plugins/hoster/FileSharkPl.py b/pyload/plugins/hoster/FileSharkPl.py index 98d31a1fc..480075004 100644 --- a/pyload/plugins/hoster/FileSharkPl.py +++ b/pyload/plugins/hoster/FileSharkPl.py @@ -10,7 +10,7 @@ from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo  class FileSharkPl(SimpleHoster):      __name    = "FileSharkPl"      __type    = "hoster" -    __version = "0.03" +    __version = "0.04"      __pattern = r'http://(?:www\.)?fileshark\.pl/pobierz/\d{6}/\w{5}' @@ -20,8 +20,6 @@ class FileSharkPl(SimpleHoster):                         ("Walter Purcaro", "vuolter@gmail.com")] -    CONTENT_DISPOSITION = True -      NAME_PATTERN = r'<h2 class="name-file">(?P<N>.+)</h2>'      SIZE_PATTERN = r'<p class="size-file">(.*?)<strong>(?P<S>\d+\.?\d*)\s(?P<U>\w+)</strong></p>' diff --git a/pyload/plugins/hoster/FilerNet.py b/pyload/plugins/hoster/FilerNet.py index b17898cd9..16008a232 100644 --- a/pyload/plugins/hoster/FilerNet.py +++ b/pyload/plugins/hoster/FilerNet.py @@ -15,7 +15,7 @@ from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo  class FilerNet(SimpleHoster):      __name    = "FilerNet"      __type    = "hoster" -    __version = "0.09" +    __version = "0.10"      __pattern = r'https?://(?:www\.)?filer\.net/get/\w+' @@ -25,8 +25,6 @@ class FilerNet(SimpleHoster):                         ("Walter Purcaro", "vuolter@gmail.com")] -    CONTENT_DISPOSITION = True -      INFO_PATTERN    = r'<h1 class="page-header">Free Download (?P<N>\S+) <small>(?P<S>[\w.]+) (?P<U>[\w^_]+)</small></h1>'      OFFLINE_PATTERN = r'Nicht gefunden' @@ -66,16 +64,17 @@ class FilerNet(SimpleHoster):              if 'location' in header and header['location']:                  self.correctCaptcha() -                self.link = urljoin('http://filer.net', header['location']) +                self.link = header['location']                  return              else:                  self.invalidCaptcha() -    def handlePremium(self): -        super(FilerNet, self).handlePremium() -        if self.link: -            self.link = urljoin("http://filer.net/", self.link) +    def downloadLink(self, link): +        if not link: +            return + +        self.download(urljoin("http://filer.net/", link), disposition=True)  getInfo = create_getInfo(FilerNet) diff --git a/pyload/plugins/hoster/Keep2shareCc.py b/pyload/plugins/hoster/Keep2shareCc.py index 25d92e273..31867d2d4 100644 --- a/pyload/plugins/hoster/Keep2shareCc.py +++ b/pyload/plugins/hoster/Keep2shareCc.py @@ -11,7 +11,7 @@ from pyload.plugins.internal.SimpleHoster import _isDirectLink, SimpleHoster, cr  class Keep2shareCc(SimpleHoster):      __name    = "Keep2shareCc"      __type    = "hoster" -    __version = "0.16" +    __version = "0.17"      __pattern = r'https?://(?:www\.)?(keep2share|k2s|keep2s)\.cc/file/(?P<ID>\w+)' @@ -23,8 +23,6 @@ class Keep2shareCc(SimpleHoster):      URL_REPLACEMENTS = [(__pattern + ".*", "http://k2s.cc/file/\g<ID>")] -    CONTENT_DISPOSITION = True -      NAME_PATTERN = r'File: <span>(?P<N>.+)</span>'      SIZE_PATTERN = r'Size: (?P<S>[^<]+)</div>' @@ -87,13 +85,7 @@ class Keep2shareCc(SimpleHoster):              if m is None:                  self.error(_("LINK_FREE_PATTERN not found")) -        self.link = self._getDownloadLink(m.group(1)) - - -    def handlePremium(self): -        super(Keep2shareCc, self).handlePremium() -        if self.link: -            self.link = self._getDownloadLink(self.link) +        self.link = m.group(1)      def handleCaptcha(self): @@ -125,11 +117,16 @@ class Keep2shareCc(SimpleHoster):              self.fail(_("All captcha attempts failed")) -    def _getDownloadLink(self, url): -        p = urlparse(self.pyfile.url) +    def downloadLink(self, link): +        if not link: +            return + +        p    = urlparse(self.pyfile.url)          base = "%s://%s" % (p.scheme, p.netloc) -        link = _isDirectLink(self, url, self.premium) -        return urljoin(base, link) if link else "" +        link = _isDirectLink(self, link, self.premium) + +        if link: +            self.download(urljoin(base, link), disposition=True)  getInfo = create_getInfo(Keep2shareCc) | 
