diff options
Diffstat (limited to 'module/plugins/crypter')
-rw-r--r-- | module/plugins/crypter/HflixIn.py | 28 | ||||
-rw-r--r-- | module/plugins/crypter/ShareLinksBiz.py | 9 |
2 files changed, 35 insertions, 2 deletions
diff --git a/module/plugins/crypter/HflixIn.py b/module/plugins/crypter/HflixIn.py new file mode 100644 index 000000000..f0bcd7d3a --- /dev/null +++ b/module/plugins/crypter/HflixIn.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- + +import re + +from module.plugins.internal.Crypter import Crypter + +class HflixIn(Crypter): + __name__ = "HflixIn" + __type__ = "crypter" + __version__ = "0.1" + __status__ = "testing" + + __pattern__ = r"http://hflix.in/\w{5}" + + __description__ = """Hflix.in Decrypter Plugin""" + __license__ = "GPLv3" + __authors__ = [("GammaC0de", "nitzo2001[AT]yahoo[DOT]com")] + + + def decrypt(self, pyfile): + headers = self.load(pyfile.url, just_header=True) + if 'refresh' in headers and headers['refresh']: + m = re.search("\d+;url=(.+)", headers['refresh']) + if m and "http://hflix.in/admin" not in m.group(1): + self.packages.append((pyfile.package().name, [m.group(1)], pyfile.package().name)) + + else: + self.offline() diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index e359bbeab..80aeb430a 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -11,7 +11,7 @@ from module.plugins.internal.Crypter import Crypter, create_getInfo class ShareLinksBiz(Crypter): __name__ = "ShareLinksBiz" __type__ = "crypter" - __version__ = "1.20" + __version__ = "1.21" __status__ = "testing" __pattern__ = r'http://(?:www\.)?(share-links|s2l)\.biz/(?P<ID>_?\w+)' @@ -71,7 +71,12 @@ class ShareLinksBiz(Crypter): url = pyfile.url if 's2l.biz' in url: - url = self.load(url, just_header=True)['location'] + header = self.load(url, just_header=True) + + if not 'location' in header: + self.fail(_("Unable to initialize download")) + else: + url = header.get('location') if re.match(self.__pattern__, url): self.base_url = "http://www.%s.biz" % re.match(self.__pattern__, url).group(1) |