From 8e7d14bae4d3c836f029a1235eb227380acc3f75 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 16 Feb 2015 21:59:10 +0100 Subject: Fix plugins to work on 0.4.10 --- module/plugins/hoster/GigapetaCom.py | 64 ------------------------------------ 1 file changed, 64 deletions(-) delete mode 100644 module/plugins/hoster/GigapetaCom.py (limited to 'module/plugins/hoster/GigapetaCom.py') diff --git a/module/plugins/hoster/GigapetaCom.py b/module/plugins/hoster/GigapetaCom.py deleted file mode 100644 index d12084d42..000000000 --- a/module/plugins/hoster/GigapetaCom.py +++ /dev/null @@ -1,64 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from random import randint - -from pyload.plugin.internal.SimpleHoster import SimpleHoster, create_getInfo - - -class GigapetaCom(SimpleHoster): - __name__ = "GigapetaCom" - __type__ = "hoster" - __version__ = "0.03" - - __pattern__ = r'http://(?:www\.)?gigapeta\.com/dl/\w+' - - __description__ = """GigaPeta.com hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - - - NAME_PATTERN = r'file-->\s*(?P.*?)\s*' - SIZE_PATTERN = r'\s*Size\s*\s*\s*(?P.*?)\s*' - OFFLINE_PATTERN = r'
' - - COOKIES = [("gigapeta.com", "lang", "us")] - - - def handleFree(self, pyfile): - captcha_key = str(randint(1, 100000000)) - captcha_url = "http://gigapeta.com/img/captcha.gif?x=%s" % captcha_key - - for _i in xrange(5): - self.checkErrors() - - captcha = self.decryptCaptcha(captcha_url) - self.html = self.load(pyfile.url, - post={'captcha_key': captcha_key, - 'captcha' : captcha, - 'download' : "Download"}, - follow_location=False) - - m = re.search(r'Location\s*:\s*(.+)', self.req.http.header, re.I) - if m: - download_url = m.group(1) - break - elif "Entered figures don`t coincide with the picture" in self.html: - self.invalidCaptcha() - else: - self.fail(_("No valid captcha code entered")) - - self.download(download_url) - - - def checkErrors(self): - if "All threads for IP" in self.html: - self.logDebug("Your IP is already downloading a file") - self.wait(5 * 60, True) - self.retry() - - self.info.pop('error', None) - - -getInfo = create_getInfo(GigapetaCom) -- cgit v1.2.3