diff options
Diffstat (limited to 'module/plugins/crypter/YoutubeComFolder.py')
-rw-r--r-- | module/plugins/crypter/YoutubeComFolder.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/module/plugins/crypter/YoutubeComFolder.py b/module/plugins/crypter/YoutubeComFolder.py index 3c794e956..de00067b4 100644 --- a/module/plugins/crypter/YoutubeComFolder.py +++ b/module/plugins/crypter/YoutubeComFolder.py @@ -3,19 +3,18 @@ import re import urlparse -from module.common.json_layer import json_loads -from module.plugins.internal.Crypter import Crypter -from module.utils import save_join as fs_join +from module.plugins.internal.Crypter import Crypter, create_getInfo +from module.plugins.internal.utils import fs_join, json class YoutubeComFolder(Crypter): __name__ = "YoutubeCom" __type__ = "crypter" - __version__ = "1.03" + __version__ = "1.04" __status__ = "testing" __pattern__ = r'https?://(?:www\.|m\.)?youtube\.com/(?P<TYPE>user|playlist|view_play_list)(/|.*?[?&](?:list|p)=)(?P<ID>[\w\-]+)' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True ), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True ), ("likes" , "bool", "Grab user (channel) liked videos" , False), @@ -34,7 +33,7 @@ class YoutubeComFolder(Crypter): req.update({'key': self.API_KEY}) url = urlparse.urljoin("https://www.googleapis.com/youtube/v3/", ref) html = self.load(url, get=req) - return json_loads(html) + return json.loads(html) def get_channel(self, user): @@ -147,3 +146,6 @@ class YoutubeComFolder(Crypter): self.packages.append((p_name, p_urls, p_folder)) #: Folder is NOT recognized by pyload 0.4.9! addedvideos.extend(p_videos) + + +getInfo = create_getInfo(YoutubeComFolder) |