diff options
author | cp1 <christopherpool1@googlemail.com> | 2009-06-11 16:50:48 +0200 |
---|---|---|
committer | cp1 <christopherpool1@googlemail.com> | 2009-06-11 16:50:48 +0200 |
commit | fd6e286ee089cf75276f2581471aba254d69fcb5 (patch) | |
tree | 1f91e2063f3182d172d7c7f70c4fdb98b407a60b /Plugins/YoutubeCom.py | |
parent | add wxversion selector to ensure wxWidgets 2.8 is used (diff) | |
download | pyload-fd6e286ee089cf75276f2581471aba254d69fcb5.tar.xz |
correcting false identation (tabs to spaces)
Diffstat (limited to 'Plugins/YoutubeCom.py')
-rw-r--r-- | Plugins/YoutubeCom.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Plugins/YoutubeCom.py b/Plugins/YoutubeCom.py index 2d8567a28..2a8315ad5 100644 --- a/Plugins/YoutubeCom.py +++ b/Plugins/YoutubeCom.py @@ -4,7 +4,7 @@ import re from Plugin import Plugin class YoutubeCom(Plugin): - + def __init__(self, parent): Plugin.__init__(self, parent) props = {} @@ -19,11 +19,11 @@ class YoutubeCom(Plugin): self.parent = parent self.html = None self.read_config() - + def download_html(self): url = self.parent.url self.html = self.req.load(url) - + def get_file_url(self): """ returns the absolute downloadable filepath """ @@ -37,23 +37,23 @@ class YoutubeCom(Plugin): quality = "&fmt=18" file_url = 'http://youtube.com/get_video?video_id=' + videoId + '&t=' + videoHash + quality return file_url - + def get_file_name(self): if self.html == None: self.download_html() - + file_name_pattern = r"<title>YouTube - (.*)</title>" file_suffix = ".flv" if self.config['high_quality']: file_suffix = ".mp4" return re.search(file_name_pattern, self.html).group(1).replace("/", "") + file_suffix - + def file_exists(self): - """ returns True or False + """ returns True or False """ if self.html == None: self.download_html() if re.search(r"(.*eine fehlerhafte Video-ID\.)", self.html) != None: return False else: - return True + return True
\ No newline at end of file |