From c9eb7081bbd4cedf9a6574c39ceb0cfde1083113 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 28 May 2009 12:52:56 +0200 Subject: clean up some code, new config parser, basic time shedule --- Plugins/UploadedTo.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'Plugins/UploadedTo.py') diff --git a/Plugins/UploadedTo.py b/Plugins/UploadedTo.py index 7c579ea15..29817e992 100644 --- a/Plugins/UploadedTo.py +++ b/Plugins/UploadedTo.py @@ -1,6 +1,5 @@ #!/usr/bin/env python -import urllib2 import re from time import time from Plugin import Plugin @@ -9,15 +8,15 @@ class UploadedTo(Plugin): def __init__(self, parent): Plugin.__init__(self, parent) - plugin_config = {} - plugin_config['name'] = "UploadedTo" - plugin_config['type'] = "hoster" - plugin_config['pattern'] = r"http://(www\.)?uploaded.to/" - plugin_config['version'] = "0.1" - plugin_config['description'] = """Uploaded.to Download Plugin""" - plugin_config['author_name'] = ("spoob") - plugin_config['author_mail'] = ("spoob@pyload.org") - self.plugin_config = plugin_config + props = {} + props['name'] = "UploadedTo" + props['type'] = "hoster" + props['pattern'] = r"http://(www\.)?uploaded.to/" + props['version'] = "0.1" + props['description'] = """Uploaded.to Download Plugin""" + props['author_name'] = ("spoob") + props['author_mail'] = ("spoob@pyload.org") + self.plugin_config = props self.parent = parent self.html = None self.html_old = None #time() where loaded the HTML @@ -83,4 +82,4 @@ class UploadedTo(Plugin): return self.time_plus_wait def __call__(self): - return self.plugin_config['name'] + return self.props['name'] -- cgit v1.2.3