From e195f96d1a4d31a1e59d7f23971edd14a1edd220 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Sat, 27 Oct 2012 01:57:45 +0200 Subject: youtube - add 3D formats, update playlist crypter --- module/plugins/crypter/YoutubeBatch.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/crypter/YoutubeBatch.py') diff --git a/module/plugins/crypter/YoutubeBatch.py b/module/plugins/crypter/YoutubeBatch.py index b48026654..88906d0db 100644 --- a/module/plugins/crypter/YoutubeBatch.py +++ b/module/plugins/crypter/YoutubeBatch.py @@ -8,8 +8,8 @@ from module.plugins.Crypter import Crypter class YoutubeBatch(Crypter): __name__ = "YoutubeBatch" __type__ = "container" - __pattern__ = r"http://(?:www\.)?(?:de\.)?\youtube\.com/(?:user/.*?/user/(?P.{16})|(?:.*?feature=PlayList\&|view_play_list\?)p=(?P.{16}))" - __version__ = "0.9" + __pattern__ = r"http://(?:[^/]*?)youtube\.com/(?:(?:view_play_list|playlist|.*?feature=PlayList).*?(?:[\?&]list|p=)|user/.*?/user/)(\w+)" + __version__ = "0.91" __description__ = """Youtube.com Channel Download Plugin""" __author_name__ = ("RaNaN", "Spoob") __author_mail__ = ("RaNaN@pyload.org", "spoob@pyload.org") @@ -17,7 +17,7 @@ class YoutubeBatch(Crypter): def setup(self): compile_id = re.compile(self.__pattern__) match_id = compile_id.match(self.pyfile.url) - self.playlist = match_id.group(match_id.lastgroup) + self.playlist = match_id.group(1) def file_exists(self): if "User not found" in self.req.load("http://gdata.youtube.com/feeds/api/playlists/%s?v=2" % self.playlist): -- cgit v1.2.3 From eb4b5b3ad206af4b4355839f0955e253b0cbf7f8 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Thu, 15 Nov 2012 22:14:54 +0100 Subject: update Youtube crypter --- module/plugins/crypter/YoutubeBatch.py | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) (limited to 'module/plugins/crypter/YoutubeBatch.py') diff --git a/module/plugins/crypter/YoutubeBatch.py b/module/plugins/crypter/YoutubeBatch.py index 88906d0db..2e68dfe02 100644 --- a/module/plugins/crypter/YoutubeBatch.py +++ b/module/plugins/crypter/YoutubeBatch.py @@ -8,26 +8,19 @@ from module.plugins.Crypter import Crypter class YoutubeBatch(Crypter): __name__ = "YoutubeBatch" __type__ = "container" - __pattern__ = r"http://(?:[^/]*?)youtube\.com/(?:(?:view_play_list|playlist|.*?feature=PlayList).*?(?:[\?&]list|p=)|user/.*?/user/)(\w+)" - __version__ = "0.91" + __pattern__ = r"http://(?:[^/]*?)youtube\.com/((?:view_play_list|playlist|.*?feature=PlayList).*?[\?&](?:list|p)=|user/)(\w+)" + __version__ = "0.92" __description__ = """Youtube.com Channel Download Plugin""" - __author_name__ = ("RaNaN", "Spoob") - __author_mail__ = ("RaNaN@pyload.org", "spoob@pyload.org") - - def setup(self): - compile_id = re.compile(self.__pattern__) - match_id = compile_id.match(self.pyfile.url) - self.playlist = match_id.group(1) - - def file_exists(self): - if "User not found" in self.req.load("http://gdata.youtube.com/feeds/api/playlists/%s?v=2" % self.playlist): - return False - return True + __author_name__ = ("RaNaN", "Spoob", "zoidberg") + __author_mail__ = ("RaNaN@pyload.org", "spoob@pyload.org", "zoidberg@mujmail.cz") def decrypt(self, pyfile): - if not self.file_exists(): - self.offline() - url = "http://gdata.youtube.com/feeds/api/playlists/%s?v=2" % self.playlist + match_id = re.match(self.__pattern__, self.pyfile.url) + if match_id.group(1) == "user/": + url = "http://gdata.youtube.com/feeds/api/users/%s/uploads?v=2" % match_id.group(2) + else: + url = "http://gdata.youtube.com/feeds/api/playlists/%s?v=2" % match_id.group(2) + rep = self.load(url) new_links = [] new_links.extend(re.findall(r"href\='(http:\/\/www.youtube.com\/watch\?v\=[^']+)&", rep)) -- cgit v1.2.3