diff options
Diffstat (limited to 'module/plugins/hoster')
| -rw-r--r-- | module/plugins/hoster/FilerNet.py | 13 | ||||
| -rw-r--r-- | module/plugins/hoster/UploadedTo.py | 4 | ||||
| -rw-r--r-- | module/plugins/hoster/XFileSharingPro.py | 23 | ||||
| -rw-r--r-- | module/plugins/hoster/ZippyshareCom.py | 4 | 
4 files changed, 30 insertions, 14 deletions
diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index c8211b435..7534c669d 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -16,7 +16,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo  class FilerNet(SimpleHoster):      __name__ = "FilerNet"      __type__ = "hoster" -    __version__ = "0.04" +    __version__ = "0.05"      __pattern__ = r'https?://(?:www\.)?filer\.net/get/(\w+)' @@ -27,8 +27,11 @@ class FilerNet(SimpleHoster):      FILE_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' +      LINK_PATTERN = r'href="([^"]+)">Get download</a>' +    RECAPTCHA_KEY = "6LcFctISAAAAAAgaeHgyqhNecGJJRnxV1m_vAz3V" +      def process(self, pyfile):          if self.premium and (not self.FORCE_CHECK_TRAFFIC or self.checkTrafficLeft()): @@ -36,6 +39,7 @@ class FilerNet(SimpleHoster):          else:              self.handleFree() +      def handleFree(self):          self.req.setOption("timeout", 120)          self.html = self.load(self.pyfile.url, decode=not self.TEXT_ENCODING, cookies=self.COOKIES) @@ -68,12 +72,8 @@ class FilerNet(SimpleHoster):          recaptcha = ReCaptcha(self) -        captcha_key = recaptcha.detect_key() -        if captcha_key is None: -            self.parseError("ReCaptcha key not found") -          for _ in xrange(5): -            challenge, response = recaptcha.challenge(captcha_key) +            challenge, response = recaptcha.challenge(self.RECAPTCHA_KEY)              post_data = {'recaptcha_challenge_field': challenge,                           'recaptcha_response_field': response,                           'hash': hash_data} @@ -97,6 +97,7 @@ class FilerNet(SimpleHoster):          self.download(downloadURL, disposition=True) +      def handlePremium(self):          header = self.load(self.pyfile.url, just_header=True)          if 'location' in header:  # Direct Download ON diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index 0affffbb9..73a903902 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -94,7 +94,7 @@ def getInfo(urls):  class UploadedTo(Hoster):      __name__ = "UploadedTo"      __type__ = "hoster" -    __version__ = "0.73" +    __version__ = "0.74"      __pattern__ = r'https?://(?:www\.)?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P<ID>\w+)' @@ -219,7 +219,7 @@ class UploadedTo(Hoster):                  self.retry()              elif "limit-parallel" in result:                  self.fail("Cannot download in parallel") -            elif self.DL_LIMIT_PATTERN in result:  # limit-dl +            elif "limit-dl" in result or self.DL_LIMIT_PATTERN in result:  # limit-dl                  self.setWait(3 * 60 * 60, True)                  self.wait()                  self.retry() diff --git a/module/plugins/hoster/XFileSharingPro.py b/module/plugins/hoster/XFileSharingPro.py index e670dc5af..fc348c90f 100644 --- a/module/plugins/hoster/XFileSharingPro.py +++ b/module/plugins/hoster/XFileSharingPro.py @@ -8,7 +8,7 @@ from module.plugins.internal.XFSPHoster import XFSPHoster, create_getInfo  class XFileSharingPro(XFSPHoster):      __name__ = "XFileSharingPro"      __type__ = "hoster" -    __version__ = "0.38" +    __version__ = "0.39"      __pattern__ = r'^unmatchable$' @@ -20,12 +20,27 @@ class XFileSharingPro(XFSPHoster):      FILE_URL_REPLACEMENTS = [(r'/embed-(\w{12}).*', r'/\1')]  #: support embedded files +    def init(self): +        self.__pattern__ = self.core.pluginManager.hosterPlugins[self.__name__]['pattern'] +        self.HOSTER_NAME = re.match(self.__pattern__, self.pyfile.url).group(1).lower() + +        account_name = "".join([str.capitalize() for str in self.HOSTER_NAME.split('.')]) +        account = self.core.accountManager.getAccountPlugin(account_name) + +        if account and account.canUse(): +            self.user, data = account.selectAccount() +            self.req = account.getAccountRequest(self.user) +            self.premium = account.isPremium(self.user) + +            self.account = account +        else: +            self.account.HOSTER_NAME = self.HOSTER_NAME + +      def setup(self):          self.chunkLimit = 1 +        self.resumeDownload = self.premium          self.multiDL = True -        self.__pattern__ = self.core.pluginManager.hosterPlugins[self.__name__]['pattern'] -        self.HOSTER_NAME = re.match(self.__pattern__, self.pyfile.url).group(1).lower() -  getInfo = create_getInfo(XFileSharingPro) diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py index 29a23353f..6144132f9 100644 --- a/module/plugins/hoster/ZippyshareCom.py +++ b/module/plugins/hoster/ZippyshareCom.py @@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo  class ZippyshareCom(SimpleHoster):      __name__ = "ZippyshareCom"      __type__ = "hoster" -    __version__ = "0.51" +    __version__ = "0.52"      __pattern__ = r'(?P<HOST>http://www\d{0,2}\.zippyshare\.com)/v(?:/|iew\.jsp.*key=)(?P<KEY>\d+)' @@ -20,7 +20,7 @@ class ZippyshareCom(SimpleHoster):      __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] -    FILE_NAME_PATTERN = r'>Name:.+?">(?P<N>.+?)<' +    FILE_NAME_PATTERN = r'var exam1x = .+ \+ "/(?P<N>.+)";'      FILE_SIZE_PATTERN = r'>Size:.+?">(?P<S>[\d.,]+) (?P<U>[\w^_]+)'      OFFLINE_PATTERN = r'>File does not exist on this server<'  | 
