From 68d662e689cd42687341c550fb6ebb74e6968d21 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 8 Sep 2014 00:29:57 +0200 Subject: module -> pyload --- pyload/plugins/hoster/FastshareCz.py | 88 ++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 pyload/plugins/hoster/FastshareCz.py (limited to 'pyload/plugins/hoster/FastshareCz.py') diff --git a/pyload/plugins/hoster/FastshareCz.py b/pyload/plugins/hoster/FastshareCz.py new file mode 100644 index 000000000..3897a1c23 --- /dev/null +++ b/pyload/plugins/hoster/FastshareCz.py @@ -0,0 +1,88 @@ +# -*- coding: utf-8 -*- +# +# Test links: +# http://www.fastshare.cz/2141189/random.bin + +import re + +from urlparse import urljoin + +from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class FastshareCz(SimpleHoster): + __name__ = "FastshareCz" + __type__ = "hoster" + __version__ = "0.22" + + __pattern__ = r'http://(?:www\.)?fastshare\.cz/\d+/.+' + + __description__ = """FastShare.cz hoster plugin""" + __author_name__ = ("zoidberg", "stickell", "Walter Purcaro") + __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it", "vuolter@gmail.com") + + FILE_INFO_PATTERN = r'

(?P[^<]+)

\s*
\s*Size\s*: (?P\d+) (?P\w+),' + OFFLINE_PATTERN = r'>(The file has been deleted|Requested page not found)' + + FILE_URL_REPLACEMENTS = [("#.*", "")] + + SH_COOKIES = [(".fastshare.cz", "lang", "en")] + + FREE_URL_PATTERN = r'action=(/free/.*?)>\s* 100% of FREE slots are full" in self.html: + self.retry(120, 60, "No free slots") + + m = re.search(self.FREE_URL_PATTERN, self.html) + if m: + action, captcha_src = m.groups() + else: + self.parseError("Free URL") + + 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}) + + check = self.checkDownload({ + "paralell_dl": + "FastShare.cz|