From b300710f168ae820df20ef63f8b4436a050373a4 Mon Sep 17 00:00:00 2001 From: Christopher <4Christopher@gmx.de> Date: Sun, 14 Apr 2013 13:03:37 +0200 Subject: Wrote DownloadVimeoCom. The website is used to get the download URL from Vimeo.com, Smotri.com, and Dailymotion.com. --- module/plugins/crypter/DownloadVimeoCom.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 module/plugins/crypter/DownloadVimeoCom.py diff --git a/module/plugins/crypter/DownloadVimeoCom.py b/module/plugins/crypter/DownloadVimeoCom.py new file mode 100644 index 000000000..0615fa835 --- /dev/null +++ b/module/plugins/crypter/DownloadVimeoCom.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import re +import HTMLParser +from module.plugins.Crypter import Crypter + +class DownloadVimeoCom(Crypter): + __name__ = 'DownloadVimeoCom' + __type__ = 'crypter' + __pattern__ = r'(?:http://vimeo.com/\d*?|http://smotri.com/video/view/?id=.*|http://www.dailymotion.com/video/.*)' + ## The download from dailymotion failed with a 403 + __version__ = '0.1' + __description__ = """Video Download Plugin based on downloadvimeo.com""" + __author_name__ = ('4Christopher') + __author_mail__ = ('4Christopher@gmx.de') + BASE_URL = 'http://downloadvimeo.com' + + def decrypt(self, pyfile): + self.package = pyfile.package() + html = self.load('%s/generate?url=%s' % (self.BASE_URL, pyfile.url)) + h = HTMLParser.HTMLParser() + try: + f = re.search(r'cmd quality="(?P[^"]+?)">\s*?(?P[^<]*?)', html) + except: + self.logDebug('Failed to find the URL') + else: + url = h.unescape(f.group('URL')) + self.logDebug('Quality: %s, URL: %s' % (f.group('quality'), url)) + self.packages.append((self.package.name, [url], self.package.folder)) -- cgit v1.2.3 From 61e46c72852b9c6ed9fc8735d1603adb95a49ba5 Mon Sep 17 00:00:00 2001 From: Christopher <4Christopher@gmx.de> Date: Sun, 14 Apr 2013 15:11:03 +0200 Subject: DownloadVimeoCom: removed pattern for Dailymotion.com There is already a plugin for Dailymotion.com. --- module/plugins/crypter/DownloadVimeoCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/plugins/crypter/DownloadVimeoCom.py b/module/plugins/crypter/DownloadVimeoCom.py index 0615fa835..7e76a90ed 100644 --- a/module/plugins/crypter/DownloadVimeoCom.py +++ b/module/plugins/crypter/DownloadVimeoCom.py @@ -8,7 +8,7 @@ from module.plugins.Crypter import Crypter class DownloadVimeoCom(Crypter): __name__ = 'DownloadVimeoCom' __type__ = 'crypter' - __pattern__ = r'(?:http://vimeo.com/\d*?|http://smotri.com/video/view/?id=.*|http://www.dailymotion.com/video/.*)' + __pattern__ = r'(?:http://vimeo.com/\d*?|http://smotri.com/video/view/?id=.*)' ## The download from dailymotion failed with a 403 __version__ = '0.1' __description__ = """Video Download Plugin based on downloadvimeo.com""" -- cgit v1.2.3 From 5e114ee4341db4bd664beb676fff34a1deecd164 Mon Sep 17 00:00:00 2001 From: Christopher <4Christopher@gmx.de> Date: Mon, 15 Apr 2013 17:42:35 +0200 Subject: DownloadVimeoCom: Fixed regular expression. --- module/plugins/crypter/DownloadVimeoCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/plugins/crypter/DownloadVimeoCom.py b/module/plugins/crypter/DownloadVimeoCom.py index 7e76a90ed..88310915b 100644 --- a/module/plugins/crypter/DownloadVimeoCom.py +++ b/module/plugins/crypter/DownloadVimeoCom.py @@ -8,7 +8,7 @@ from module.plugins.Crypter import Crypter class DownloadVimeoCom(Crypter): __name__ = 'DownloadVimeoCom' __type__ = 'crypter' - __pattern__ = r'(?:http://vimeo.com/\d*?|http://smotri.com/video/view/?id=.*)' + __pattern__ = r'(?:http://vimeo\.com/\d*|http://smotri\.com/video/view/\?id=.*)' ## The download from dailymotion failed with a 403 __version__ = '0.1' __description__ = """Video Download Plugin based on downloadvimeo.com""" -- cgit v1.2.3