summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/ShareRapidCom.py
diff options
context:
space:
mode:
authorGravatar zoidberg10 <zoidberg@mujmail.cz> 2011-09-27 11:04:57 +0200
committerGravatar zoidberg10 <zoidberg@mujmail.cz> 2011-09-27 11:04:57 +0200
commita159147ae67249279677d51ff348c0c7c70f0b1d (patch)
tree5fbbf2b7ebcb6e435a35b1488a0173beb39ab577 /module/plugins/hoster/ShareRapidCom.py
parentplugins: czshare premium, czshare/quickshare/filefactory folders (diff)
downloadpyload-a159147ae67249279677d51ff348c0c7c70f0b1d.tar.xz
plugins: fix czshare premium, add ifolder.ru, share-rapid.com by MikyWoW
Diffstat (limited to 'module/plugins/hoster/ShareRapidCom.py')
-rw-r--r--module/plugins/hoster/ShareRapidCom.py36
1 files changed, 36 insertions, 0 deletions
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('<a href="http://s')
+ self.html = self.html[start+9:]
+ start = self.html.index('"')
+ self.html = self.html[0:start]
+ self.download(self.html) \ No newline at end of file