summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/FilerNet.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-07-10 03:02:26 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-07-10 03:02:26 +0200
commit04038a2cf0c4c2d9cc9a0c8e8bf9beb6426afae8 (patch)
tree703010e32f62bf869551ce0d323dacf62bc448ff /module/plugins/hoster/FilerNet.py
parent[SimpleCrypter] Support parseError (diff)
downloadpyload-04038a2cf0c4c2d9cc9a0c8e8bf9beb6426afae8.tar.xz
Use parseError instead PluginParseError + unified all download pattern attributes as LINK_PATTERN + removed some old patterns (not used anymore) + other code cosmetics
Diffstat (limited to 'module/plugins/hoster/FilerNet.py')
-rw-r--r--module/plugins/hoster/FilerNet.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py
index 9a2bbafbf..72396fac6 100644
--- a/module/plugins/hoster/FilerNet.py
+++ b/module/plugins/hoster/FilerNet.py
@@ -37,8 +37,9 @@ 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'
- RECAPTCHA_KEY = '6LcFctISAAAAAAgaeHgyqhNecGJJRnxV1m_vAz3V'
- DIRECT_LINK_PATTERN = r'href="([^"]+)">Get download</a>'
+ RECAPTCHA_KEY = "6LcFctISAAAAAAgaeHgyqhNecGJJRnxV1m_vAz3V"
+ LINK_PATTERN = r'href="([^"]+)">Get download</a>'
+
def process(self, pyfile):
if self.premium and (not self.SH_CHECK_TRAFFIC or self.checkTrafficLeft()):
@@ -74,7 +75,7 @@ class FilerNet(SimpleHoster):
hash_data = inputs['hash']
self.logDebug('Hash: ' + hash_data)
- downloadURL = ''
+ downloadURL = r''
recaptcha = ReCaptcha(self)
for _ in xrange(5):
challenge, response = recaptcha.challenge(self.RECAPTCHA_KEY)
@@ -107,7 +108,7 @@ class FilerNet(SimpleHoster):
dl = self.pyfile.url
else: # Direct Download OFF
html = self.load(self.pyfile.url)
- m = re.search(self.DIRECT_LINK_PATTERN, html)
+ m = re.search(self.LINK_PATTERN, html)
if not m:
self.parseError("Unable to detect direct link, try to enable 'Direct download' in your user settings")
dl = 'http://filer.net' + m.group(1)