From 8e47b0de30a25d0fd5dfb518bfe4e1e7beff93fd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 15 Jul 2014 16:27:44 +0200 Subject: Key attributes cleanup for account, container and crypter plugins --- module/plugins/crypter/YoutubeBatch.py | 10 +++++++--- 1 file changed, 7 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 dd5d937d5..dfac9140f 100644 --- a/module/plugins/crypter/YoutubeBatch.py +++ b/module/plugins/crypter/YoutubeBatch.py @@ -15,9 +15,10 @@ along with this program; if not, see . """ -from urlparse import urljoin import re +from urlparse import urljoin + from module.common.json_layer import json_loads from module.plugins.Crypter import Crypter from module.utils import save_join @@ -27,16 +28,19 @@ API_URL = "AIzaSyCKnWLNlkX-L4oD1aEzqqhRw1zczeD6_k0" class YoutubeBatch(Crypter): __name__ = "YoutubeBatch" + __version__ = "1.00" __type__ = "crypter" + __pattern__ = r'https?://(?:www\.|m\.)?youtube\.com/(?Puser|playlist|view_play_list)(/|.*?[?&](?:list|p)=)(?P[\w-]+)' - __version__ = "1.00" - __description__ = """Youtube.com channel & playlist decrypter plugin""" __config__ = [("likes", "bool", "Grab user (channel) liked videos", False), ("favorites", "bool", "Grab user (channel) favorite videos", False), ("uploads", "bool", "Grab channel unplaylisted videos", True)] + + __description__ = """Youtube.com channel & playlist decrypter plugin""" __author_name__ = "Walter Purcaro" __author_mail__ = "vuolter@gmail.com" + def api_response(self, ref, req): req.update({"key": API_KEY}) url = urljoin("https://www.googleapis.com/youtube/v3/", ref) -- cgit v1.2.3