diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-02-16 10:46:28 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-02-16 10:46:28 +0100 |
commit | ce1c2b6b05c08b669357947e61ae40efce7fc50f (patch) | |
tree | 0b5f7996960cf35c4eface53a89eba18a37519b7 /module/plugins/internal/DeadHoster.py | |
parent | Fix filename case (diff) | |
download | pyload-ce1c2b6b05c08b669357947e61ae40efce7fc50f.tar.xz |
module temp
Diffstat (limited to 'module/plugins/internal/DeadHoster.py')
-rw-r--r-- | module/plugins/internal/DeadHoster.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/module/plugins/internal/DeadHoster.py b/module/plugins/internal/DeadHoster.py new file mode 100644 index 000000000..27036a139 --- /dev/null +++ b/module/plugins/internal/DeadHoster.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- + +from urllib import unquote +from urlparse import urlparse + +from pyload.plugin.Hoster import Hoster as _Hoster +from pyload.plugin.internal.SimpleHoster import create_getInfo + + +class DeadHoster(_Hoster): + __name__ = "DeadHoster" + __type__ = "hoster" + __version__ = "0.14" + + __pattern__ = r'^unmatchable$' + + __description__ = """Hoster is no longer available""" + __license__ = "GPLv3" + __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] + + + @classmethod + def getInfo(cls, url="", html=""): + return {'name': urlparse(unquote(url)).path.split('/')[-1] or _("Unknown"), 'size': 0, 'status': 1, 'url': url} + + + def setup(self): + self.pyfile.error = "Hoster is no longer available" + self.offline() #@TODO: self.offline("Hoster is no longer available") + + +getInfo = create_getInfo(DeadHoster) |