diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-07-29 12:09:42 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-07-29 12:09:42 +0200 |
commit | 2ba07aa53d2af572af2c5a43e77725abd46e1b13 (patch) | |
tree | 89ff915a3a476dd9431d38c6e2b39b9de1aeb0f5 /module/plugins/hoster/BasePlugin.py | |
parent | Added tag working for changeset 3cca18acfe7d (diff) | |
download | pyload-2ba07aa53d2af572af2c5a43e77725abd46e1b13.tar.xz |
many new stuff, some things already working
Diffstat (limited to 'module/plugins/hoster/BasePlugin.py')
-rw-r--r-- | module/plugins/hoster/BasePlugin.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py new file mode 100644 index 000000000..09545d493 --- /dev/null +++ b/module/plugins/hoster/BasePlugin.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import re +from module.plugins.Hoster import Hoster + +class BasePlugin(Hoster): + __name__ = "BasePlugin" + __type__ = "hoster" + __pattern__ = r"^unmatchable$" + __version__ = "0.1" + __description__ = """Base Plugin when any other didnt fit""" + __author_name__ = ("RaNaN") + __author_mail__ = ("RaNaN@pyload.org") + + def process(self, pyfile): + """main function""" + + if pyfile.url.startswith("http://"): + + pyfile.name = re.findall("([^\/=]+)", pyfile.url)[-1] + self.download(pyfile.url) + + else: + self.fail("No Plugin matched and not a downloadable url.")
\ No newline at end of file |