diff options
author | spoob <spoob@gmx.de> | 2010-04-06 17:39:24 +0200 |
---|---|---|
committer | spoob <spoob@gmx.de> | 2010-04-06 17:39:24 +0200 |
commit | 8ef92d8f6d80a8fa4a94f82b28e74acc4dcb8910 (patch) | |
tree | 81eacb51fda5caa473baed446dec95324c5c534e | |
parent | Universal File Not Found (diff) | |
download | pyload-8ef92d8f6d80a8fa4a94f82b28e74acc4dcb8910.tar.xz |
Some Youtube Fixes, ugly
-rw-r--r-- | module/plugins/decrypter/YoutubeChannel.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/YoutubeCom.py | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/module/plugins/decrypter/YoutubeChannel.py b/module/plugins/decrypter/YoutubeChannel.py index ba2ca1472..73cf76094 100644 --- a/module/plugins/decrypter/YoutubeChannel.py +++ b/module/plugins/decrypter/YoutubeChannel.py @@ -21,7 +21,7 @@ class YoutubeChannel(Plugin): self.parent = parent self.html = None self.read_config() - self.user = re.search(r"/user/(.+)", self.parent.url).group(1) + self.user = re.search(r"/user/(.+)", self.parent.url).group(1).split("#")[0] def file_exists(self): if "User not found" in self.req.load("http://gdata.youtube.com/feeds/api/users/%s" % self.user): @@ -45,7 +45,7 @@ class YoutubeChannel(Plugin): max_results = 50 url = "http://gdata.youtube.com/feeds/api/users/%s/%s?max-results=%i&start-index=%i" % (self.user, group, max_results, start_index) rep = self.req.load(url) - new_links = re.findall(r"href\='(http:\/\/www.youtube.com\/watch\?v\=[^']+)", rep) + new_links = re.findall(r"href\='(http:\/\/www.youtube.com\/watch\?v\=[^']+)&", rep) if new_links != []: temp_links.extend(new_links) else: diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py index 7754b82a4..5f3874640 100644 --- a/module/plugins/hoster/YoutubeCom.py +++ b/module/plugins/hoster/YoutubeCom.py @@ -56,8 +56,7 @@ class YoutubeCom(Plugin): def get_file_name(self): if self.html == None: self.download_html() - - file_name_pattern = r'<span class="" title="(.+?)">' + file_name_pattern = '<meta name="title" content="(.+?)">' is_hd_pattern = r"'IS_HD_AVAILABLE': (false|true)" file_suffix = ".flv" is_hd = re.search(is_hd_pattern, self.html).group(1) @@ -66,7 +65,7 @@ class YoutubeCom(Plugin): file_suffix = ".mp4" name = re.search(file_name_pattern, self.html).group(1).replace("/", "") + file_suffix - name = name.replace("&", "&") + name = name.replace("&", "&").replace("ö", "oe").replace("ä", "ae").replace("ü", "ue") return name def file_exists(self): |