From a159147ae67249279677d51ff348c0c7c70f0b1d Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Tue, 27 Sep 2011 11:04:57 +0200 Subject: plugins: fix czshare premium, add ifolder.ru, share-rapid.com by MikyWoW --- module/plugins/hoster/ShareRapidCom.py | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 module/plugins/hoster/ShareRapidCom.py (limited to 'module/plugins/hoster/ShareRapidCom.py') diff --git a/module/plugins/hoster/ShareRapidCom.py b/module/plugins/hoster/ShareRapidCom.py new file mode 100644 index 000000000..e7979d0a8 --- /dev/null +++ b/module/plugins/hoster/ShareRapidCom.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import re +from module.plugins.Hoster import Hoster + +class ShareRapidCom(Hoster): + __name__ = "ShareRapidCom" + __type__ = "hoster" + __pattern__ = r"http://(?:www.)?(share-rapid)?(.com|.cz)/" + __version__ = "0.1" + __description__ = """share-rapid Plugin""" + __author_name__ = ("MikyWoW") + __author_mail__ = ("MikyWoW@seznam.cz") + + def setup(self): + self.chunkLimit = 1 + self.resumeDownload = True + + def process(self, pyfile): + name = pyfile.url + if "?" in pyfile.url: + name = re.findall("([^?=]+)", name)[-3] + + pyfile.name = re.findall("([^/=]+)", name)[-1] + + self.html = self.load(pyfile.url) + + if "Stahování je přístupné pouze přihlášeným uživatelům" in self.html: + self.fail("Nepřihlášen") + else: + start = self.html.index('