From 6108a1b42e4db6d211e934a2548168981761f7c6 Mon Sep 17 00:00:00 2001 From: Christopher <4Christopher@gmx.de> Date: Tue, 12 Mar 2013 13:15:41 +0100 Subject: =?UTF-8?q?moved=20ChipDe=20to=20the=20hoster=20plugins=20?= =?UTF-8?q?=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/plugins/hoster/ChipDe.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 module/plugins/hoster/ChipDe.py (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/ChipDe.py b/module/plugins/hoster/ChipDe.py new file mode 100644 index 000000000..fcb84a300 --- /dev/null +++ b/module/plugins/hoster/ChipDe.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import re +from module.plugins.Crypter import Crypter + +class ChipDe(Crypter): + __name__ = "ChipDe" + __type__ = "container" + __pattern__ = r"http://(?:www\.)?chip.de/video/.*\.html" + __version__ = "0.1" + __description__ = """Chip.de Container Plugin""" + __author_name__ = ('4Christopher') + __author_mail__ = ('4Christopher@gmx.de') + + def decrypt(self, pyfile): + self.html = self.load(pyfile.url) + try: + url = re.search(r'"(http://video.chip.de/\d+?/.*)"', self.html).group(1) + self.logDebug('The file URL is %s' % url) + except: + self.fail('Failed to find the URL') + + self.packages.append((self.pyfile.package().name, [ url ], self.pyfile.package().folder)) -- cgit v1.2.3 From 033130a4b8ed995c6b3d4a18e4aa25129f8758da Mon Sep 17 00:00:00 2001 From: Christopher <4Christopher@gmx.de> Date: Tue, 12 Mar 2013 19:25:27 +0100 Subject: XvidstageCom: Deleted whitespace --- module/plugins/hoster/XvidstageCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/XvidstageCom.py b/module/plugins/hoster/XvidstageCom.py index 38c54efec..6f3559d17 100644 --- a/module/plugins/hoster/XvidstageCom.py +++ b/module/plugins/hoster/XvidstageCom.py @@ -13,7 +13,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, see . - + @author: 4Christopher """ @@ -29,7 +29,7 @@ def setup(self): def getInfo(urls): result = [] - + for url in urls: result.append(parseFileInfo(url, getInfoMode = True)) yield result -- cgit v1.2.3 From b3118afc4b8b03a8c248529757c9558610075a33 Mon Sep 17 00:00:00 2001 From: Christopher <4Christopher@gmx.de> Date: Wed, 13 Mar 2013 16:49:42 +0100 Subject: XvidstageCom: I can now recognize if a file is offline --- module/plugins/hoster/XvidstageCom.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/XvidstageCom.py b/module/plugins/hoster/XvidstageCom.py index 6f3559d17..14079df43 100644 --- a/module/plugins/hoster/XvidstageCom.py +++ b/module/plugins/hoster/XvidstageCom.py @@ -37,9 +37,10 @@ def getInfo(urls): def parseFileInfo(url, getInfoMode = False): html = getURL(url) info = {"name" : url, "size" : 0, "status" : 3} - info['name'] = re.search(r'(?:Filename|Dateiname):]*?>(.*?)<', html).group(1) - info['size'] = re.search(r'(?:Size|Größe):.*? \((\d+?) bytes\)', html).group(1) - if info['size'] == 0: + try: + info['name'] = re.search(r'(?:Filename|Dateiname):]*?>(.*?)<', html).group(1) + info['size'] = re.search(r'(?:Size|Größe):.*? \((\d+?) bytes\)', html).group(1) + except: ## The file is offline info['status'] = 1 else: info['status'] = 2 @@ -51,7 +52,7 @@ def parseFileInfo(url, getInfoMode = False): class XvidstageCom(Hoster): __name__ = 'XvidstageCom' - __version__ = '0.2' + __version__ = '0.3' __pattern__ = r'http://(?:www.)?xvidstage.com/(?P[0-9A-Za-z]+)' __type__ = 'hoster' __description__ = """A Plugin that allows you to download files from http://xvidstage.com""" -- cgit v1.2.3