From 8e7d14bae4d3c836f029a1235eb227380acc3f75 Mon Sep 17 00:00:00 2001
From: Walter Purcaro <vuolter@gmail.com>
Date: Mon, 16 Feb 2015 21:59:10 +0100
Subject: Fix plugins to work on 0.4.10

---
 module/plugins/hoster/FastshareCz.py | 79 ------------------------------------
 1 file changed, 79 deletions(-)
 delete mode 100644 module/plugins/hoster/FastshareCz.py

(limited to 'module/plugins/hoster/FastshareCz.py')

diff --git a/module/plugins/hoster/FastshareCz.py b/module/plugins/hoster/FastshareCz.py
deleted file mode 100644
index 6fe871ad4..000000000
--- a/module/plugins/hoster/FastshareCz.py
+++ /dev/null
@@ -1,79 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import re
-
-from urlparse import urljoin
-
-from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
-
-
-class FastshareCz(SimpleHoster):
-    __name__    = "FastshareCz"
-    __type__    = "hoster"
-    __version__ = "0.27"
-
-    __pattern__ = r'http://(?:www\.)?fastshare\.cz/\d+/.+'
-
-    __description__ = """FastShare.cz hoster plugin"""
-    __license__     = "GPLv3"
-    __authors__     = [("Walter Purcaro", "vuolter@gmail.com")]
-
-    URL_REPLACEMENTS = [("#.*", "")]
-
-    COOKIES = [("fastshare.cz", "lang", "en")]
-
-    INFO_PATTERN    = r'<h1 class="dwp">(?P<N>[^<]+)</h1>\s*<div class="fileinfo">\s*Size\s*: (?P<S>\d+) (?P<U>[\w^_]+),'
-    OFFLINE_PATTERN = r'>(The file has been deleted|Requested page not found)'
-
-    LINK_FREE_PATTERN    = r'action=(/free/.*?)>\s*<img src="([^"]*)"><br'
-    LINK_PREMIUM_PATTERN = r'(http://data\d+\.fastshare\.cz/download\.php\?id=\d+&)'
-
-    SLOT_ERROR   = "> 100% of FREE slots are full"
-    CREDIT_ERROR = " credit for "
-
-
-    def checkErrors(self):
-        if self.SLOT_ERROR in self.html:
-            errmsg = self.info['error'] = _("No free slots")
-            self.retry(12, 60, errmsg)
-
-        if self.CREDIT_ERROR in self.html:
-            errmsg = self.info['error'] = _("Not enough traffic left")
-            self.logWarning(errmsg)
-            self.resetAccount()
-
-        self.info.pop('error', None)
-
-
-    def handleFree(self, pyfile):
-        m = re.search(self.FREE_URL_PATTERN, self.html)
-        if m:
-            action, captcha_src = m.groups()
-        else:
-            self.error(_("FREE_URL_PATTERN not found"))
-
-        baseurl = "http://www.fastshare.cz"
-        captcha = self.decryptCaptcha(urljoin(baseurl, captcha_src))
-        self.download(urljoin(baseurl, action), post={'code': captcha, 'btn.x': 77, 'btn.y': 18})
-
-
-    def checkFile(self):
-        check = self.checkDownload({
-            'paralell-dl'  : re.compile(r"<title>FastShare.cz</title>|<script>alert\('Pres FREE muzete stahovat jen jeden soubor najednou.'\)"),
-            'wrong captcha': re.compile(r'Download for FREE'),
-            'credit'       : re.compile(self.CREDIT_ERROR)
-        })
-
-        if check == "paralell-dl":
-            self.retry(6, 10 * 60, _("Paralell download"))
-
-        elif check == "wrong captcha":
-            self.retry(max_tries=5, reason=_("Wrong captcha"))
-
-        elif check == "credit":
-            self.resetAccount()
-
-        return super(FastshareCz, self).checkFile()
-
-
-getInfo = create_getInfo(FastshareCz)
-- 
cgit v1.2.3