From b38de5f214e3c9bce9967922f49da9aba0e00641 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Mon, 23 Jan 2012 20:18:29 +0100 Subject: more hoster disabled --- module/plugins/hoster/FilejungleCom.py | 52 ++++------------------------------ 1 file changed, 5 insertions(+), 47 deletions(-) (limited to 'module/plugins/hoster/FilejungleCom.py') diff --git a/module/plugins/hoster/FilejungleCom.py b/module/plugins/hoster/FilejungleCom.py index b880086a6..7aa7eca37 100644 --- a/module/plugins/hoster/FilejungleCom.py +++ b/module/plugins/hoster/FilejungleCom.py @@ -21,11 +21,14 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo from module.network.RequestFactory import getURL from module.plugins.ReCaptcha import ReCaptcha +def getInfo(urls): + yield [(url, 0, 1, url) for url in urls] + class FilejungleCom(SimpleHoster): __name__ = "FilejungleCom" __type__ = "hoster" __pattern__ = r"http://(?:www\.)?filejungle\.com/f/([^/]+).*" - __version__ = "0.23" + __version__ = "0.24" __description__ = """Filejungle.com plugin - free only""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") @@ -36,50 +39,5 @@ class FilejungleCom(SimpleHoster): WAIT_TIME_PATTERN = r'

Please wait for (\d+) seconds to download the next file\.

' def handleFree(self): - file_id = re.search(self.__pattern__, self.pyfile.url).group(1) - url = "http://www.filejungle.com/f/%s" % file_id - self.logDebug("File ID: %s" % file_id) - - # Get captcha - found = re.search(self.RECAPTCHA_KEY_PATTERN, self.html) - if not found: self.fail("Captcha key not found") - captcha_key = found.group(1) - - json_response = self.load(self.pyfile.url, post = {"checkDownload" : "check"}, decode = True) - self.logDebug(json_response) - if r'"success":"showCaptcha"' in json_response: - recaptcha = ReCaptcha(self) - for i in range(5): - captcha_challenge, captcha_response = recaptcha.challenge(captcha_key) - self.logDebug("RECAPTCHA: %s : %s : %s" % (captcha_key, captcha_challenge, captcha_response)) - - json_response = self.load("http://www.filejungle.com/checkReCaptcha.php", post = { - "recaptcha_challenge_field" : captcha_challenge, - "recaptcha_response_field" : captcha_response, - "recaptcha_shortencode_field" : file_id - }, decode = True) - self.logDebug(json_response) - if r'{"success":1}' in json_response: - self.correctCaptcha() - break - else: - self.invalidCaptcha() - else: self.fail("Invalid captcha") - elif r'"fail":"timeLimit"' in json_response: - self.html = self.load(url, post = {"checkDownload" : "showError", "errorType" : "timeLimit"}) - found = re.search(self.WAIT_TIME_PATTERN, self.html) - self.retry(5, int(found.group(1)) if found else 1200, "Time limit reached") - else: - self.fail("Unknown server response") - - json_response = self.load(url, post = {"downloadLink" : "wait"}, decode = True) - self.logDebug(json_response[:30]) - found = re.search(r'"waitTime":(\d+)', json_response) - if not found: self.fail("Cannot get wait time") - self.setWait(int(found.group(1))) - self.wait() - - response = self.load(url, post = {"downloadLink" : "show"}) - self.download(url, post = {"download" : "normal"}) + self.fail("Hoster not longer available") -getInfo = create_getInfo(FilejungleCom) \ No newline at end of file -- cgit v1.2.3 From 8fde04777e98e421f24b8fda0ea2c62d46e12849 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sat, 28 Jan 2012 19:40:17 +0000 Subject: Update FileJungle for non existing files. --- module/plugins/hoster/FilejungleCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/FilejungleCom.py') diff --git a/module/plugins/hoster/FilejungleCom.py b/module/plugins/hoster/FilejungleCom.py index 7aa7eca37..dc36fa1d9 100644 --- a/module/plugins/hoster/FilejungleCom.py +++ b/module/plugins/hoster/FilejungleCom.py @@ -34,7 +34,7 @@ class FilejungleCom(SimpleHoster): __author_mail__ = ("zoidberg@mujmail.cz") FILE_INFO_PATTERN = r'
(?P[^<]+) \((?P[0-9.]+) (?P[kKMG])i?B\)
' - FILE_OFFLINE_PATTERN = r'class="error_msg_title"> Invalid or Deleted File. ' + FILE_OFFLINE_PATTERN = r'(This file is no longer available.|class="error_msg_title"> Invalid or Deleted File. )' RECAPTCHA_KEY_PATTERN = r"var reCAPTCHA_publickey='([^']+)'" WAIT_TIME_PATTERN = r'

Please wait for (\d+) seconds to download the next file\.

' -- cgit v1.2.3 From 591a2138fe395e5d7306d240bfbd00ae0a2d6575 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 29 Jan 2012 12:12:11 +0100 Subject: re-enable filejungle --- module/plugins/hoster/FilejungleCom.py | 54 ++++++++++++++++++++++++++++++---- 1 file changed, 48 insertions(+), 6 deletions(-) (limited to 'module/plugins/hoster/FilejungleCom.py') diff --git a/module/plugins/hoster/FilejungleCom.py b/module/plugins/hoster/FilejungleCom.py index dc36fa1d9..b880086a6 100644 --- a/module/plugins/hoster/FilejungleCom.py +++ b/module/plugins/hoster/FilejungleCom.py @@ -21,23 +21,65 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo from module.network.RequestFactory import getURL from module.plugins.ReCaptcha import ReCaptcha -def getInfo(urls): - yield [(url, 0, 1, url) for url in urls] - class FilejungleCom(SimpleHoster): __name__ = "FilejungleCom" __type__ = "hoster" __pattern__ = r"http://(?:www\.)?filejungle\.com/f/([^/]+).*" - __version__ = "0.24" + __version__ = "0.23" __description__ = """Filejungle.com plugin - free only""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") FILE_INFO_PATTERN = r'
(?P[^<]+) \((?P[0-9.]+) (?P[kKMG])i?B\)
' - FILE_OFFLINE_PATTERN = r'(This file is no longer available.|class="error_msg_title"> Invalid or Deleted File. )' + FILE_OFFLINE_PATTERN = r'class="error_msg_title"> Invalid or Deleted File. ' RECAPTCHA_KEY_PATTERN = r"var reCAPTCHA_publickey='([^']+)'" WAIT_TIME_PATTERN = r'

Please wait for (\d+) seconds to download the next file\.

' def handleFree(self): - self.fail("Hoster not longer available") + file_id = re.search(self.__pattern__, self.pyfile.url).group(1) + url = "http://www.filejungle.com/f/%s" % file_id + self.logDebug("File ID: %s" % file_id) + + # Get captcha + found = re.search(self.RECAPTCHA_KEY_PATTERN, self.html) + if not found: self.fail("Captcha key not found") + captcha_key = found.group(1) + + json_response = self.load(self.pyfile.url, post = {"checkDownload" : "check"}, decode = True) + self.logDebug(json_response) + if r'"success":"showCaptcha"' in json_response: + recaptcha = ReCaptcha(self) + for i in range(5): + captcha_challenge, captcha_response = recaptcha.challenge(captcha_key) + self.logDebug("RECAPTCHA: %s : %s : %s" % (captcha_key, captcha_challenge, captcha_response)) + + json_response = self.load("http://www.filejungle.com/checkReCaptcha.php", post = { + "recaptcha_challenge_field" : captcha_challenge, + "recaptcha_response_field" : captcha_response, + "recaptcha_shortencode_field" : file_id + }, decode = True) + self.logDebug(json_response) + if r'{"success":1}' in json_response: + self.correctCaptcha() + break + else: + self.invalidCaptcha() + else: self.fail("Invalid captcha") + elif r'"fail":"timeLimit"' in json_response: + self.html = self.load(url, post = {"checkDownload" : "showError", "errorType" : "timeLimit"}) + found = re.search(self.WAIT_TIME_PATTERN, self.html) + self.retry(5, int(found.group(1)) if found else 1200, "Time limit reached") + else: + self.fail("Unknown server response") + + json_response = self.load(url, post = {"downloadLink" : "wait"}, decode = True) + self.logDebug(json_response[:30]) + found = re.search(r'"waitTime":(\d+)', json_response) + if not found: self.fail("Cannot get wait time") + self.setWait(int(found.group(1))) + self.wait() + + response = self.load(url, post = {"downloadLink" : "show"}) + self.download(url, post = {"download" : "normal"}) +getInfo = create_getInfo(FilejungleCom) \ No newline at end of file -- cgit v1.2.3 From a00c570460963995b6c6259507cea7e5da2e82a3 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sat, 28 Jan 2012 19:40:17 +0000 Subject: Update FileJungle for non existing files. --- module/plugins/hoster/FilejungleCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/FilejungleCom.py') diff --git a/module/plugins/hoster/FilejungleCom.py b/module/plugins/hoster/FilejungleCom.py index b880086a6..652d9547b 100644 --- a/module/plugins/hoster/FilejungleCom.py +++ b/module/plugins/hoster/FilejungleCom.py @@ -31,7 +31,7 @@ class FilejungleCom(SimpleHoster): __author_mail__ = ("zoidberg@mujmail.cz") FILE_INFO_PATTERN = r'
(?P[^<]+) \((?P[0-9.]+) (?P[kKMG])i?B\)
' - FILE_OFFLINE_PATTERN = r'class="error_msg_title"> Invalid or Deleted File. ' + FILE_OFFLINE_PATTERN = r'(This file is no longer available.|class="error_msg_title"> Invalid or Deleted File. )' RECAPTCHA_KEY_PATTERN = r"var reCAPTCHA_publickey='([^']+)'" WAIT_TIME_PATTERN = r'

Please wait for (\d+) seconds to download the next file\.

' @@ -82,4 +82,4 @@ class FilejungleCom(SimpleHoster): response = self.load(url, post = {"downloadLink" : "show"}) self.download(url, post = {"download" : "normal"}) -getInfo = create_getInfo(FilejungleCom) \ No newline at end of file +getInfo = create_getInfo(FilejungleCom) -- cgit v1.2.3 From 08145bdcaf3e02b5ae85c20cf17977e81a3b9012 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 29 Jan 2012 12:13:19 +0100 Subject: increase version --- module/plugins/hoster/FilejungleCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/FilejungleCom.py') diff --git a/module/plugins/hoster/FilejungleCom.py b/module/plugins/hoster/FilejungleCom.py index 652d9547b..c49cc8506 100644 --- a/module/plugins/hoster/FilejungleCom.py +++ b/module/plugins/hoster/FilejungleCom.py @@ -25,7 +25,7 @@ class FilejungleCom(SimpleHoster): __name__ = "FilejungleCom" __type__ = "hoster" __pattern__ = r"http://(?:www\.)?filejungle\.com/f/([^/]+).*" - __version__ = "0.23" + __version__ = "0.25" __description__ = """Filejungle.com plugin - free only""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") -- cgit v1.2.3