summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/YoutubeBatch.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/crypter/YoutubeBatch.py')
-rw-r--r--module/plugins/crypter/YoutubeBatch.py10
1 files changed, 7 insertions, 3 deletions
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 <http://www.gnu.org/licenses/>.
"""
-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/(?P<TYPE>user|playlist|view_play_list)(/|.*?[?&](?:list|p)=)(?P<ID>[\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)