diff options
Diffstat (limited to 'Plugins')
| -rw-r--r-- | Plugins/Plugin.py | 5 | ||||
| -rw-r--r-- | Plugins/RapidshareCom.py | 6 | ||||
| -rw-r--r-- | Plugins/UploadedTo.py | 5 | ||||
| -rw-r--r-- | Plugins/YoutubeCom.py | 24 | 
4 files changed, 21 insertions, 19 deletions
| diff --git a/Plugins/Plugin.py b/Plugins/Plugin.py index 971677ec7..1babd3686 100644 --- a/Plugins/Plugin.py +++ b/Plugins/Plugin.py @@ -9,7 +9,7 @@ class Plugin():      def __init__(self, parent):          self.plugin_name = None          self.plugin_pattern = None -        self.plugin_type = "" +        self.plugin_type = "hoster"          pluginProp = {}          pluginProp ['name'] = "Beispiel Plugin"          pluginProp ['version'] = "0.1" @@ -23,6 +23,7 @@ class Plugin():          self.html = None          self.time_plus_wait = None #time() + wait in seconds          self.want_reconnect = None +	self.multi_dl = True      def set_parent_status(self):          """ sets all available Statusinfos about a File in self.parent.status @@ -46,6 +47,8 @@ class Plugin():          """          if self.html != None:              self.download_html() +	return self.parent.url +      def get_file_name(self):          raise NotImplementedError diff --git a/Plugins/RapidshareCom.py b/Plugins/RapidshareCom.py index 6ad0b43e8..f512b2460 100644 --- a/Plugins/RapidshareCom.py +++ b/Plugins/RapidshareCom.py @@ -17,20 +17,22 @@ class RapidshareCom(Plugin):          self.plugin_pattern = r"http://(?:www.)?rapidshare.com/files/"          self.plugin_type = "hoster"          self.plugin_config = {} -        pluginProp = {} +	pluginProp = {}          pluginProp ['name'] = "RapidshareCom"          pluginProp ['version'] = "0.1"          pluginProp ['format'] = "*.py"          pluginProp ['description'] = """Rapidshare Plugin"""          pluginProp ['author'] = "spoob"          pluginProp ['author_email'] = "nn@nn.de" -        self.pluginProp = pluginProp  +	pluginProp ['multi_dl'] = False +	self.pluginProp = pluginProp          self.parent = parent          self.html = [None, None]          self.prehtml = None          self.html_old = None         #time() where loaded the HTML          self.time_plus_wait = None   #time() + wait in seconds          self.want_reconnect = False +	self.multi_dl = False      def set_parent_status(self):          """ sets all available Statusinfos about a File in self.parent.status diff --git a/Plugins/UploadedTo.py b/Plugins/UploadedTo.py index 4b2d3c6f0..d75a4eb95 100644 --- a/Plugins/UploadedTo.py +++ b/Plugins/UploadedTo.py @@ -13,19 +13,20 @@ class UploadedTo(Plugin):          self.plugin_pattern = r"http://(www\.)?uploaded.to/"          self.plugin_type = "hoster"          self.plugin_config = {} -        pluginProp = {} +	pluginProp = {}          pluginProp ['name'] = "UploadedTo"          pluginProp ['version'] = "0.1"          pluginProp ['format'] = "*.py"          pluginProp ['description'] = """Uploaded Plugin"""          pluginProp ['author'] = "spoob"          pluginProp ['author_email'] = "spoob@gmx.de" -        self.pluginProp = pluginProp  +	self.pluginProp = pluginProp          self.parent = parent          self.html = None          self.html_old = None         #time() where loaded the HTML          self.time_plus_wait = None   #time() + wait in seconds          self.want_reconnect = None +	self.multi_dl = False      def set_parent_status(self):          """ sets all available Statusinfos about a File in self.parent.status diff --git a/Plugins/YoutubeCom.py b/Plugins/YoutubeCom.py index 2c019aa7c..7224323bb 100644 --- a/Plugins/YoutubeCom.py +++ b/Plugins/YoutubeCom.py @@ -13,14 +13,14 @@ class YoutubeCom(Plugin):          self.plugin_pattern = r"http://(www\.)?(de\.)?\youtube\.com/watch\?v=(.*)"          self.plugin_type = "hoster"          self.plugin_config = {} -        pluginProp = {} +	pluginProp = {}          pluginProp ['name'] = "YoutubeCom"          pluginProp ['version'] = "0.1"          pluginProp ['format'] = "*.py"          pluginProp ['description'] = """Youtube Plugin"""          pluginProp ['author'] = "spoob"          pluginProp ['author_email'] = "spoob@pyload.org" -        self.pluginProp = pluginProp  +	self.pluginProp = pluginProp          self.parent = parent          self.html = None          self.html_old = None         #time() where loaded the HTML @@ -45,22 +45,18 @@ class YoutubeCom(Plugin):          """          if self.html == None:              self.download_html() -        if not self.want_reconnect: -            videoId = re.search(self.plugin_pattern, self.parent.url).group(3) -            videoHash = re.search(r', "t": "([^"]+)"', self.html).group(1) -            file_url = 'http://youtube.com/get_video?video_id=' + videoId + '&t=' + videoHash + '&fmt=18' -            return file_url -        else: -            return False + +        videoId = re.search(self.plugin_pattern, self.parent.url).group(3) +        videoHash = re.search(r', "t": "([^"]+)"', self.html).group(1) +        file_url = 'http://youtube.com/get_video?video_id=' + videoId + '&t=' + videoHash + '&fmt=18' +        return file_url      def get_file_name(self):          if self.html == None:              self.download_html() -        if not self.want_reconnect: -            file_name_pattern = r"<title>YouTube - (.*)</title>" -            return re.search(file_name_pattern, self.html).group(1).replace("/", "") + '.mp4' -        else: -            return self.parent.url + +         file_name_pattern = r"<title>YouTube - (.*)</title>" +         return re.search(file_name_pattern, self.html).group(1).replace("/", "") + '.mp4'      def file_exists(self):          """ returns True or False  | 
