summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/File4safeCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/File4safeCom.py')
-rw-r--r--module/plugins/hoster/File4safeCom.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/module/plugins/hoster/File4safeCom.py b/module/plugins/hoster/File4safeCom.py
index 9e06972e2..7ec775103 100644
--- a/module/plugins/hoster/File4safeCom.py
+++ b/module/plugins/hoster/File4safeCom.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
import re
+
from pycurl import FOLLOWLOCATION
from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo
@@ -9,14 +10,17 @@ from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInf
class File4safeCom(XFileSharingPro):
__name__ = "File4safeCom"
__type__ = "hoster"
+ __version__ = "0.02"
+
__pattern__ = r'https?://(?:www\.)?file4safe\.com/\w+'
- __version__ = "0.01"
+
__description__ = """File4safe.com hoster plugin"""
__author_name__ = "stickell"
__author_mail__ = "l.stickell@yahoo.it"
HOSTER_NAME = "file4safe.com"
+
def handlePremium(self):
self.req.http.lastURL = self.pyfile.url
@@ -25,9 +29,9 @@ class File4safeCom(XFileSharingPro):
self.header = self.req.http.header
self.req.http.c.setopt(FOLLOWLOCATION, 1)
- found = re.search(r"Location\s*:\s*(.*)", self.header, re.I)
- if found and re.match(self.DIRECT_LINK_PATTERN, found.group(1)):
- location = found.group(1).strip()
+ m = re.search(r"Location\s*:\s*(.*)", self.header, re.I)
+ if m and re.match(self.LINK_PATTERN, m.group(1)):
+ location = m.group(1).strip()
self.startDownload(location)
else:
self.parseError("Unable to detect premium download link")