From 1c93fefbea4140b45688b0cdd30e9527b5688e53 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Mon, 23 Jan 2012 19:51:10 +0100 Subject: disabled some hoster --- module/plugins/hoster/FileserveCom.py | 23 +------- module/plugins/hoster/FilesonicCom.py | 31 +--------- module/plugins/hoster/MegauploadCom.py | 105 +-------------------------------- module/plugins/hoster/X7To.py | 52 ++-------------- 4 files changed, 13 insertions(+), 198 deletions(-) (limited to 'module') diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py index 7f34621aa..ce3836a48 100644 --- a/module/plugins/hoster/FileserveCom.py +++ b/module/plugins/hoster/FileserveCom.py @@ -12,26 +12,13 @@ from module.utils import parseFileSize def getInfo(urls): - reg = r"(http://(?:www\.)?fileserve\.com/file/.+(?:[\r\n\t]+)?)[\r\n\t ]+(.*?)[\r\n\t ]+(.*?)[\r\n\t ]+(Available|Not available)(?:\ )?(?:)" - url = "http://fileserve.com/link-checker.php" - - #get all at once, shows strange behavior otherwise - html = getURL(url, post={"submit": "Check Urls", "urls": "\n".join(urls)}, decode=True) - - match = re.findall(reg, html, re.IGNORECASE + re.MULTILINE) - - result = [] - for url, name, size, status in match: - result.append((name, parseFileSize(size), 1 if status == "Not available" else 2, url)) - - yield result - + yield [(url, 0, 1, url) for url in urls] class FileserveCom(Hoster): __name__ = "FileserveCom" __type__ = "hoster" __pattern__ = r"http://(www\.)?fileserve\.com/file/[a-zA-Z0-9]+" - __version__ = "0.43" + __version__ = "0.44" __description__ = """Fileserve.Com File Download Hoster""" __author_name__ = ("jeix", "mkaay", "paul king") __author_mail__ = ("jeix@hasnomail.de", "mkaay@mkaay.de", "") @@ -48,11 +35,7 @@ class FileserveCom(Hoster): self.chunkLimit = 1 def process(self, pyfile): - self.checkFile() - if self.account and self.premium: - self.handlePremium() - else: - self.handleFree() + self.fail("Hoster not longer available") def checkFile(self): self.file_id = re.search(self.FILE_ID_KEY, self.pyfile.url).group("id") diff --git a/module/plugins/hoster/FilesonicCom.py b/module/plugins/hoster/FilesonicCom.py index 2788e7c62..525a99e7a 100644 --- a/module/plugins/hoster/FilesonicCom.py +++ b/module/plugins/hoster/FilesonicCom.py @@ -14,25 +14,7 @@ from module.common.json_layer import json_loads def getInfo(urls): - for chunk in chunks(urls, 20): - result = [] - ids = dict() - for url in chunk: - id = getId(url) - if id: - ids[id] = url - else: - result.append((None, 0, 1, url)) - - if len(ids) > 0: - check_url = "http://api.filesonic.com/link?method=getInfo&format=json&ids=" + ",".join(ids.keys()) - response = json_loads(getURL(check_url, decode=True)) - for item in response["FSApi_Link"]["getInfo"]["response"]["links"]: - if item["status"] != "AVAILABLE": - result.append((ids[str(item["id"])], 0, 1, ids[str(item["id"])])) - else: - result.append((unquote(item["filename"]), item["size"], 2, ids[str(item["id"])])) - yield result + yield [(url, 0, 1, url) for url in urls] def getId(url): @@ -47,7 +29,7 @@ class FilesonicCom(Hoster): __name__ = "FilesonicCom" __type__ = "hoster" __pattern__ = r"http://[\w\.]*?(sharingmatrix|filesonic)\..*?/.*?file/([a-zA-Z0-9]+(/.+)?|[a-z0-9]+/[0-9]+(/.+)?|[0-9]+(/.+)?)" - __version__ = "0.35" + __version__ = "0.36" __description__ = """FilesonicCom und Sharingmatrix Download Hoster""" __author_name__ = ("jeix", "paulking") __author_mail__ = ("jeix@hasnomail.de", "") @@ -70,14 +52,7 @@ class FilesonicCom(Hoster): self.multiDL = False def process(self, pyfile): - self.pyfile = pyfile - - self.pyfile.url = self.checkFile(self.pyfile.url) - - if self.premium: - self.downloadPremium() - else: - self.downloadFree() + self.fail("Hoster not longer available") def checkFile(self, url): id = getId(url) diff --git a/module/plugins/hoster/MegauploadCom.py b/module/plugins/hoster/MegauploadCom.py index 81d528668..336cbfb58 100644 --- a/module/plugins/hoster/MegauploadCom.py +++ b/module/plugins/hoster/MegauploadCom.py @@ -15,37 +15,8 @@ from module.PyFile import statusMap from pycurl import error def getInfo(urls): + yield [(url, 0, 1, url) for url in urls] - result = [] - - # MU API request - post = {} - fileIds=[] - for match in re.finditer(MegauploadCom.__pattern__, " ".join(urls)): - fileIds.append(match.group("id")) - for i, fileId in enumerate(fileIds): - post["id%i" % i] = fileId - response = getURL(MegauploadCom.API_URL, post=post, decode = True) - - # Process API response - parts = [re.split(r"&(?!amp;|#\d+;)", x) for x in re.split(r"&?(?=id[\d]+=)", response)] - apiHosterMap = dict([elem.split('=') for elem in parts[0]]) - for entry in parts[1:]: - apiFileDataMap = dict([elem.split('=') for elem in entry]) - apiFileId = [key for key in apiFileDataMap.keys() if key.startswith('id')][0] - i = int(apiFileId.replace('id', '')) - - # File info - fileInfo = _translateAPIFileInfo(apiFileId, apiFileDataMap, apiHosterMap) - url = urls[i] - name = html_unescape(fileInfo.get('name', url)) - size = fileInfo.get('size', 0) - status = fileInfo.get('status', statusMap['queued']) - - # Add result - result.append( (name, size, status, url ) ) - - yield result def _translateAPIFileInfo(apiFileId, apiFileDataMap, apiHosterMap): @@ -65,7 +36,7 @@ class MegauploadCom(Hoster): __name__ = "MegauploadCom" __type__ = "hoster" __pattern__ = r"http://[\w\.]*?(megaupload)\.com/.*?(\?|&)d=(?P[0-9A-Za-z]+)" - __version__ = "0.31" + __version__ = "0.32" __description__ = """Megaupload.com Download Hoster""" __author_name__ = ("spoob") __author_mail__ = ("spoob@pyload.org") @@ -92,77 +63,7 @@ class MegauploadCom(Hoster): def process(self, pyfile): - if not self.account or not self.premium: - self.download_html() - self.download_api() - - if not self.file_exists(): - self.offline() - - url = self.get_file_url() - if not url: self.fail("URL could not be retrieved") - - time = self.get_wait_time() - self.setWait(time) - self.wait() - - try: - self.download(url) - except BadHeader, e: - if not e.code == 503: raise - self.checkWait() - - check = self.checkDownload({"limit": "Download limit exceeded"}) - if check == "limit": - self.checkWait() - - else: - self.download_api() - pyfile.name = self.get_file_name() - - try: - self.download(pyfile.url) - except error, e: - if e.args and e.args[0] == 33: - # undirect download and resume , not a good idea - page = self.load(pyfile.url) - self.download(re.search(self.PREMIUM_URL_PATTERN, page).group(1)) - return - else: - raise - - check = self.checkDownload({"dllink": re.compile(self.PREMIUM_URL_PATTERN)}) - if check == "dllink": - self.log.warning(_("You should enable direct Download in your Megaupload Account settings")) - - pyfile.size = 0 - self.download(self.lastCheck.group(1)) - - def checkWait(self): - - wait = 0 - - for i in range(10): - page = self.load("http://www.megaupload.com/?c=premium&l=1", decode=True) - # MU thinks dl is already running - if "Please finish this download before starting another one." in page and i != 9: - sleep(2) - elif i != 9: - try: - wait = re.search(r"Please wait (\d+) minutes", page).group(1) - break - except : - pass - else: - wait = 2 # lowest limit seems to be 2 minutes - - self.log.info(_("Megaupload: waiting %d minutes") % int(wait)) - self.setWait(int(wait)*60, True) - self.wait() - if not self.premium: - self.req.clearCookies() - - self.retry(max_tries=10) + self.fail("Hoster not longer available") def download_html(self): for i in range(3): diff --git a/module/plugins/hoster/X7To.py b/module/plugins/hoster/X7To.py index dba7338e4..2ba534cff 100644 --- a/module/plugins/hoster/X7To.py +++ b/module/plugins/hoster/X7To.py @@ -6,36 +6,14 @@ from module.plugins.Hoster import Hoster from module.network.RequestFactory import getURL def getInfo(urls): - result = [] - - for url in urls: - html = getURL(url) - - if "var page = '404';" in html: - result.append((url, 0, 1, url)) - continue - - fileInfo = re.search(X7To.FILE_INFO_PATTERN, html) - if fileInfo: - name = fileInfo.group(1) - units = float(fileInfo.group(2).replace(",", ".")) - pow = {'KB': 1, 'MB': 2, 'GB': 3}[fileInfo.group(3)] - size = int(units * 1024 ** pow) - else: - # fallback: name could not be extracted.. most likely change on x7.to side ... needs to be checked then - name = url - size = 0 - - result.append((name, size, 2, url)) - - yield result + yield [(url, 0, 1, url) for url in urls] class X7To(Hoster): __name__ = "X7To" __type__ = "hoster" __pattern__ = r"http://(?:www.)?x7.to/" - __version__ = "0.1" + __version__ = "0.2" __description__ = """X7.To File Download Hoster""" __author_name__ = ("ernieb") __author_mail__ = ("ernieb") @@ -55,29 +33,7 @@ class X7To(Hoster): self.pyfile.url = "http://x7.to/" + self.file_id def process(self, pyfile): - self.html = self.load(self.pyfile.url, ref=False, decode=True) - - if "var page = '404';" in self.html: - self.offline() - - fileInfo = re.search(self.FILE_INFO_PATTERN, self.html, re.IGNORECASE) - size = 0 - trafficLeft = 100000000000 - if fileInfo: - self.pyfile.name = fileInfo.group(1) - if self.account: - trafficLeft = self.account.getAccountInfo(self.user)["trafficleft"] - units = float(fileInfo.group(2).replace(".", "").replace(",", ".")) - pow = {'KB': 1, 'MB': 2, 'GB': 3}[fileInfo.group(3)] - size = int(units * 1024 ** pow) - self.logDebug("filesize: %s trafficleft: %s" % (size, trafficLeft)) - else: - self.logDebug("name and size not found") - - if self.account and self.premium and trafficLeft > size: - self.handlePremium() - else: - self.handleFree() + self.fail("Hoster not longer available") def handlePremium(self): # check if over limit first @@ -134,4 +90,4 @@ class X7To(Hoster): except: self.logDebug("downloading url failed: %s" % url) else: - self.fail("Free download url found") \ No newline at end of file + self.fail("Free download url found") -- cgit v1.2.3 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 +++---------------------------- module/plugins/hoster/UploadStationCom.py | 32 +++---------------- 2 files changed, 10 insertions(+), 74 deletions(-) (limited to 'module') 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 diff --git a/module/plugins/hoster/UploadStationCom.py b/module/plugins/hoster/UploadStationCom.py index f89ef3ad1..fea5f4245 100644 --- a/module/plugins/hoster/UploadStationCom.py +++ b/module/plugins/hoster/UploadStationCom.py @@ -8,37 +8,13 @@ from module.plugins.ReCaptcha import ReCaptcha import re def getInfo(urls): - result = [] - - for url in urls: - - # Get file info html - html = getURL(url) - if re.search(UploadStationCom.FILE_OFFLINE_PATTERN, html): - result.append((url, 0, 1, url)) - continue - - # Name - name = re.search(UploadStationCom.FILE_TITLE_PATTERN, html).group(1) - - # Size - m = re.search(UploadStationCom.FILE_SIZE_PATTERN, html) - value = float(m.group(1)) - units = m.group(2) - pow = {'KB' : 1, 'MB' : 2, 'GB' : 3}[units] - size = int(value*1024**pow) - - # Return info - result.append((name, size, 2, url)) - - yield result - + yield [(url, 0, 1, url) for url in urls] class UploadStationCom(Hoster): __name__ = "UploadStationCom" __type__ = "hoster" __pattern__ = r"http://(www\.)?uploadstation\.com/file/(?P[A-Za-z0-9]+)" - __version__ = "0.31" + __version__ = "0.33" __description__ = """UploadStation.Com File Download Hoster""" __author_name__ = ("fragonib") __author_mail__ = ("fragonib[AT]yahoo[DOT]es") @@ -61,6 +37,8 @@ class UploadStationCom(Hoster): def process(self, pyfile): + self.fail("Hoster not longer available") + # Get URL self.html = self.load(self.pyfile.url, ref=False, decode=True) @@ -160,4 +138,4 @@ class UploadStationCom(Hoster): self.logDebug("Failed, you need to wait %d seconds for another download." % wait) self.setWait(wait + 3, True) self.wait() - self.retry() \ No newline at end of file + self.retry() -- cgit v1.2.3 From 9ceab3d8f9fac0c37cb7b5f7c29a690cdf1abf54 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Wed, 25 Jan 2012 17:03:17 +0100 Subject: fix some hosters, disable some more --- module/plugins/crypter/MediafireComFolder.py | 7 +- module/plugins/hoster/EnteruploadCom.py | 4 +- module/plugins/hoster/MediafireCom.py | 4 +- module/plugins/hoster/TurbouploadCom.py | 7 +- module/plugins/hoster/UploadboxCom.py | 7 +- module/plugins/hoster/UploadhereCom.py | 7 +- module/plugins/hoster/UploadingCom.py | 64 ++++----- module/plugins/hoster/UploadkingCom.py | 5 +- module/plugins/hoster/WuploadCom.py | 191 ++++++++++++++++++++++++--- module/plugins/internal/DeadHoster.py | 19 +++ module/plugins/internal/SimpleHoster.py | 21 ++- 11 files changed, 256 insertions(+), 80 deletions(-) create mode 100644 module/plugins/internal/DeadHoster.py (limited to 'module') diff --git a/module/plugins/crypter/MediafireComFolder.py b/module/plugins/crypter/MediafireComFolder.py index 1056a3947..1d800b1b0 100644 --- a/module/plugins/crypter/MediafireComFolder.py +++ b/module/plugins/crypter/MediafireComFolder.py @@ -8,8 +8,8 @@ from module.common.json_layer import json_loads class MediafireComFolder(Crypter): __name__ = "MediafireComFolder" __type__ = "crypter" - __pattern__ = r"http://(\w*\.)*mediafire\.com/(folder/|\?).*" - __version__ = "0.12" + __pattern__ = r"http://(\w*\.)*mediafire\.com/(folder/|\?sharekey=|(\?\w{13}|\w+)($|[/#]))" + __version__ = "0.13" __description__ = """Mediafire.com Folder Plugin""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") @@ -44,9 +44,6 @@ class MediafireComFolder(Crypter): new_links.append("http://www.mediafire.com/file/%s" % link['quickkey']) else: self.fail(json_resp['response']['message']) - else: - fileID = re.search(self.__pattern__, pyfile.url) - new_links.append("ttp://www.mediafire.com/file/%s" % fileID) elif result == 1: self.offline() else: diff --git a/module/plugins/hoster/EnteruploadCom.py b/module/plugins/hoster/EnteruploadCom.py index 37e24a93f..2c99b0047 100644 --- a/module/plugins/hoster/EnteruploadCom.py +++ b/module/plugins/hoster/EnteruploadCom.py @@ -17,13 +17,13 @@ """ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster as SimpleHoster, create_getInfo class EnteruploadCom(SimpleHoster): __name__ = "EnteruploadCom" __type__ = "hoster" __pattern__ = r"http://(?:www\.)?enterupload.com/\w+.*" - __version__ = "0.01" + __version__ = "0.02" __description__ = """EnterUpload.com plugin - free only""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") diff --git a/module/plugins/hoster/MediafireCom.py b/module/plugins/hoster/MediafireCom.py index f40071478..c1d6e3595 100644 --- a/module/plugins/hoster/MediafireCom.py +++ b/module/plugins/hoster/MediafireCom.py @@ -57,8 +57,8 @@ def getInfo(urls): class MediafireCom(SimpleHoster): __name__ = "MediafireCom" __type__ = "hoster" - __pattern__ = r"http://(?:\w*\.)*mediafire\.com/[^?].*" - __version__ = "0.73" + __pattern__ = r"http://(\w*\.)*mediafire\.com/(file/|(download.php)?\?)(\w{11}|\w{15})($|/)" + __version__ = "0.74" __description__ = """Mediafire.com plugin - free only""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") diff --git a/module/plugins/hoster/TurbouploadCom.py b/module/plugins/hoster/TurbouploadCom.py index 59939d3c7..6e81c6319 100644 --- a/module/plugins/hoster/TurbouploadCom.py +++ b/module/plugins/hoster/TurbouploadCom.py @@ -17,14 +17,15 @@ """ import re -from module.plugins.internal.SimpleHoster import create_getInfo -from module.plugins.hoster.EasybytezCom import EasybytezCom +from module.plugins.internal.DeadHoster import DeadHoster as EasybytezCom, create_getInfo +#from module.plugins.internal.SimpleHoster import create_getInfo +#from module.plugins.hoster.EasybytezCom import EasybytezCom class TurbouploadCom(EasybytezCom): __name__ = "TurbouploadCom" __type__ = "hoster" __pattern__ = r"http://(?:\w*\.)?turboupload.com/(\w+).*" - __version__ = "0.01" + __version__ = "0.02" __description__ = """turboupload.com""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") diff --git a/module/plugins/hoster/UploadboxCom.py b/module/plugins/hoster/UploadboxCom.py index 0eb023cb2..ce80b37dc 100644 --- a/module/plugins/hoster/UploadboxCom.py +++ b/module/plugins/hoster/UploadboxCom.py @@ -17,7 +17,9 @@ """ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo +from module.plugins.internal.DeadHoster import DeadHoster as SimpleHoster + +""" from module.network.RequestFactory import getURL def getInfo(urls): @@ -26,12 +28,13 @@ def getInfo(urls): html = getURL('http://uploadbox.com/files/%s/?ac=lang&lang_new=en' % file_id, decode = False) file_info = parseFileInfo(UploadboxCom, url, html) yield file_info +""" class UploadboxCom(SimpleHoster): __name__ = "Uploadbox" __type__ = "hoster" __pattern__ = r"http://(?:www\.)?uploadbox\.com/files/([^/]+).*" - __version__ = "0.04" + __version__ = "0.05" __description__ = """UploadBox.com plugin - free only""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") diff --git a/module/plugins/hoster/UploadhereCom.py b/module/plugins/hoster/UploadhereCom.py index 385e77dc7..8deec1397 100644 --- a/module/plugins/hoster/UploadhereCom.py +++ b/module/plugins/hoster/UploadhereCom.py @@ -16,14 +16,15 @@ @author: zoidberg """ -from module.plugins.internal.SimpleHoster import create_getInfo -from UploadkingCom import UploadkingCom +from module.plugins.internal.DeadHoster import DeadHoster as UploadkingCom, create_getInfo +#from module.plugins.internal.SimpleHoster import create_getInfo +#from UploadkingCom import UploadkingCom class UploadhereCom(UploadkingCom): __name__ = "UploadhereCom" __type__ = "hoster" __pattern__ = r"http://(?:www\.)?uploadhere\.com/\w{10}" - __version__ = "0.11" + __version__ = "0.12" __description__ = """Uploadhere.com plugin - free only""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") diff --git a/module/plugins/hoster/UploadingCom.py b/module/plugins/hoster/UploadingCom.py index 83bbaea82..1278bfc01 100644 --- a/module/plugins/hoster/UploadingCom.py +++ b/module/plugins/hoster/UploadingCom.py @@ -18,32 +18,21 @@ """ import re +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, timestamp -from time import time - -from module.plugins.Hoster import Hoster - -def timestamp(): - return int(time()*1000) - -class UploadingCom(Hoster): +class UploadingCom(SimpleHoster): __name__ = "UploadingCom" __type__ = "hoster" __pattern__ = r"http://(?:www\.)?uploading\.com/files/(?:get/)?[\w\d]+/?" - __version__ = "0.2" + __version__ = "0.30" __description__ = """Uploading.Com File Download Hoster""" - __author_name__ = ("jeix", "mkaay") - __author_mail__ = ("jeix@hasnomail.de", "mkaay@mkaay.de") + __author_name__ = ("jeix", "mkaay", "zoidberg") + __author_mail__ = ("jeix@hasnomail.de", "mkaay@mkaay.de", "zoidberg@mujmail.cz") + + FILE_NAME_PATTERN = r'Download (?P<N>.*?) for free on uploading.com' + FILE_SIZE_PATTERN = r'File size: (?P.*?)' + FILE_OFFLINE_PATTERN = r'

The requested file is not found

' - def setup(self): - self.html = [None,None,None] - if self.account: - self.resumeDownload = True - self.multiDL = True - else: - self.resumeDownload = False - self.multiDL = False - def process(self, pyfile): # set lang to english self.req.cj.setCookie("uploading.com", "lang", "1") @@ -51,16 +40,13 @@ class UploadingCom(Hoster): self.req.cj.setCookie("uploading.com", "setlang", "en") self.req.cj.setCookie("uploading.com", "_lang", "en") - if not "/get" in self.pyfile.url: + if not "/get/" in self.pyfile.url: self.pyfile.url = self.pyfile.url.replace("/files", "/files/get") - self.html[0] = self.load(self.pyfile.url) - if re.search(r'

The requested file is not found

', self.html[0]) is not None: - self.offline() - - self.pyfile.name = re.search(r'Download (.*?) for free on uploading.com', self.html[0]).group(1) + self.html = self.load(pyfile.url, decode = True) + self.file_info = self.getFileInfo() - if self.account: + if self.premium: url = self.handlePremium() else: url = self.handleFree() @@ -69,35 +55,35 @@ class UploadingCom(Hoster): def handlePremium(self): postData = {'action': 'get_link', - 'code': re.search('code: "(.*?)",', self.html[0]).group(1), + 'code': re.search('code: "(.*?)",', self.html).group(1), 'pass': 'undefined'} - self.html[2] = self.load('http://uploading.com/files/get/?JsHttpRequest=%d-xml' % timestamp(), post=postData) - url = re.search(r'"link"\s*:\s*"(.*?)"', self.html[2]) + self.html = self.load('http://uploading.com/files/get/?JsHttpRequest=%d-xml' % timestamp(), post=postData) + url = re.search(r'"link"\s*:\s*"(.*?)"', self.html) if url: return url.group(1).replace("\\/", "/") raise Exception("Plugin defect.") def handleFree(self): - found = re.search('

((Daily )?Download Limit)

', self.html[0]) + found = re.search('

((Daily )?Download Limit)

', self.html) if found: self.pyfile.error = found.group(1) self.logWarning(self.pyfile.error) self.retry(max_tries=6, wait_time = 21600 if found.group(2) else 900, reason = self.pyfile.error) - self.code = re.search(r'name="code" value="(.*?)"', self.html[0]).group(1) - self.fileid = re.search(r'name="file_id" value="(.*?)"', self.html[0]).group(1) + self.code = re.search(r'name="code" value="(.*?)"', self.html).group(1) + self.fileid = re.search(r'name="file_id" value="(.*?)"', self.html).group(1) postData = {'action': 'second_page', 'code': self.code, 'file_id': self.fileid} - self.html[1] = self.load(self.pyfile.url, post=postData) + self.html = self.load(self.pyfile.url, post=postData) - wait_time = re.search(r'timead_counter">(\d+)<', self.html[1]) + wait_time = re.search(r'timead_counter">(\d+)<', self.html) if not wait_time: - wait_time = re.search(r'start_timer\((\d+)\)', self.html[1]) + wait_time = re.search(r'start_timer\((\d+)\)', self.html) if wait_time: wait_time = int(wait_time.group(1)) @@ -114,9 +100,11 @@ class UploadingCom(Hoster): captcha_url = "http://uploading.com/general/captcha/download%s/?ts=%d" % (self.fileid, timestamp()) postData['captcha_code'] = self.decryptCaptcha(captcha_url) - self.html[2] = self.load('http://uploading.com/files/get/?JsHttpRequest=%d-xml' % timestamp(), post=postData) - url = re.search(r'"link"\s*:\s*"(.*?)"', self.html[2]) + self.html = self.load('http://uploading.com/files/get/?JsHttpRequest=%d-xml' % timestamp(), post=postData) + url = re.search(r'"link"\s*:\s*"(.*?)"', self.html) if url: return url.group(1).replace("\\/", "/") raise Exception("Plugin defect.") + +getInfo = create_getInfo(UploadingCom) \ No newline at end of file diff --git a/module/plugins/hoster/UploadkingCom.py b/module/plugins/hoster/UploadkingCom.py index a2e246d29..be2d6c3bd 100644 --- a/module/plugins/hoster/UploadkingCom.py +++ b/module/plugins/hoster/UploadkingCom.py @@ -17,13 +17,14 @@ """ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster as SimpleHoster, create_getInfo +#from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class UploadkingCom(SimpleHoster): __name__ = "UploadkingCom" __type__ = "hoster" __pattern__ = r"http://(?:www\.)?uploadking\.com/\w{10}" - __version__ = "0.13" + __version__ = "0.14" __description__ = """UploadKing.com plugin - free only""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") diff --git a/module/plugins/hoster/WuploadCom.py b/module/plugins/hoster/WuploadCom.py index 11b61ae59..1a0eb442b 100644 --- a/module/plugins/hoster/WuploadCom.py +++ b/module/plugins/hoster/WuploadCom.py @@ -3,10 +3,10 @@ import re import string - -from types import MethodType +from urllib import unquote from module.plugins.Hoster import Hoster +from module.plugins.ReCaptcha import ReCaptcha from module.plugins.Plugin import chunks from module.network.RequestFactory import getURL @@ -31,7 +31,7 @@ def getInfo(urls): if item["status"] != "AVAILABLE": result.append((None, 0, 1, ids[str(item["id"])])) else: - result.append((item["filename"], item["size"], 2, ids[str(item["id"])])) + result.append((unquote(item["filename"]), item["size"], 2, ids[str(item["id"])])) yield result @@ -47,7 +47,7 @@ class WuploadCom(Hoster): __name__ = "WuploadCom" __type__ = "hoster" __pattern__ = r"http://[\w\.]*?wupload\..*?/file/(([a-z][0-9]+/)?[0-9]+)(/.*)?" - __version__ = "0.1" + __version__ = "0.20" __description__ = """Wupload com""" __author_name__ = ("jeix", "paulking") __author_mail__ = ("jeix@hasnomail.de", "") @@ -63,24 +63,179 @@ class WuploadCom(Hoster): CAPTCHA_TYPE2_PATTERN = r'id="recaptcha_image"> 300: + self.wantReconnect = True + + self.setWait(wait) + self.logDebug("Waiting %d seconds." % wait) + self.wait() + + tm = re.search(self.WAIT_TM_PATTERN, self.html) + tm_hash = re.search(self.WAIT_TM_HASH_PATTERN, self.html) + + if tm and tm_hash: + tm = tm.group(1) + tm_hash = tm_hash.group(1) + self.html = self.load(url, post={"tm": tm, "tm_hash": tm_hash}) + self.handleErrors() + break + else: + self.html = self.load(url) + self.handleErrors() + waitSearch = re.search(self.WAIT_TIME_PATTERN, self.html) - module = self.core.pluginManager.getPlugin("FilesonicCom") - fs = getattr(module, "FilesonicCom") + def handleErrors(self): + if "This file is available for premium users only." in self.html: + self.fail("need premium account for file") - self.newInit = MethodType(fs.__dict__["init"], self, WuploadCom) + if "The file that you're trying to download is larger than" in self.html: + self.fail("need premium account for file") - methods = ["process", "checkFile", "downloadPremium", "downloadFree", "doWait", "handleErrors"] - #methods to bind from fs + if "Free users may only download 1 file at a time" in self.html: + self.fail("only 1 file at a time for free users") - for m in methods: - setattr(self, m, MethodType(fs.__dict__[m], self, WuploadCom)) + if "Free user can not download files" in self.html: + self.fail("need premium account for file") - self.newInit() + if "Download session in progress" in self.html: + self.fail("already downloading") + if "This file is password protected" in self.html: + self.fail("This file is password protected") - def getDomain(self): - result = json_loads( - self.load(self.API_ADDRESS + "/utility?method=getWuploadDomainForCurrentIp&format=json", decode=True)) - self.log.debug("%s: response to get domain %s" % (self.__name__, result)) - return result["FSApi_Utility"]["getWuploadDomainForCurrentIp"]["response"] \ No newline at end of file + if "An Error Occurred" in self.html: + self.fail("A server error occured.") + + if "This file was deleted" in self.html: + self.offline() diff --git a/module/plugins/internal/DeadHoster.py b/module/plugins/internal/DeadHoster.py new file mode 100644 index 000000000..2de1634b9 --- /dev/null +++ b/module/plugins/internal/DeadHoster.py @@ -0,0 +1,19 @@ +from module.plugins.Hoster import Hoster as _Hoster + +def create_getInfo(plugin): + def getInfo(urls): + for url in urls: + yield '#N/A: ' + url, 0, 1, url + return getInfo + +class Hoster(_Hoster): + __name__ = "DeadHoster" + __type__ = "hoster" + __pattern__ = r"" + __version__ = "0.1" + __description__ = """Hoster is no longer available""" + __author_name__ = ("zoidberg") + __author_mail__ = ("zoidberg@mujmail.cz") + + def init(self): + self.fail("Hoster is no longer available") \ No newline at end of file diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 12b629a81..69909a8a1 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -18,6 +18,7 @@ """ from urlparse import urlparse import re +from time import time from module.plugins.Hoster import Hoster from module.utils import html_unescape, fixup, parseFileSize @@ -36,10 +37,13 @@ def parseHtmlTagAttrValue(attr_name, tag): def parseFileInfo(self, url = '', html = '', infomode = False): if not html and hasattr(self, "html"): html = self.html + info = {"name" : url, "size" : 0, "status" : 3} online = False - if hasattr(self, "FILE_OFFLINE_PATTERN") and re.search(self.FILE_OFFLINE_PATTERN, html): + if hasattr(self, "req") and self.req.http.code == '404': + info['status'] = 1 + elif hasattr(self, "FILE_OFFLINE_PATTERN") and re.search(self.FILE_OFFLINE_PATTERN, html): # File offline info['status'] = 1 else: @@ -53,7 +57,8 @@ def parseFileInfo(self, url = '', html = '', infomode = False): if online: # File online, return name and size info['status'] = 2 - if 'N' in info: info['name'] = reSub(info['N'], self.FILE_NAME_REPLACEMENTS) + if 'N' in info: + info['name'] = reSub(info['N'], self.FILE_NAME_REPLACEMENTS) if 'S' in info: size = reSub(info['S'] + info['U'] if 'U' in info else info['S'], self.FILE_SIZE_REPLACEMENTS) info['size'] = parseFileSize(size) @@ -69,10 +74,14 @@ def parseFileInfo(self, url = '', html = '', infomode = False): def create_getInfo(plugin): def getInfo(urls): for url in urls: - file_info = parseFileInfo(plugin, url, getURL(reSub(url, plugin.FILE_URL_REPLACEMENTS), decode=True)) + file_info = parseFileInfo(plugin, url, getURL(reSub(url, plugin.FILE_URL_REPLACEMENTS), \ + decode = False if plugin.HTML_BROKEN_ENCODING else True)) yield file_info return getInfo +def timestamp(): + return int(time()*1000) + class PluginParseError(Exception): def __init__(self, msg): Exception.__init__(self) @@ -82,7 +91,7 @@ class PluginParseError(Exception): class SimpleHoster(Hoster): __name__ = "SimpleHoster" - __version__ = "0.16" + __version__ = "0.17" __pattern__ = None __type__ = "hoster" __description__ = """Base hoster plugin""" @@ -100,13 +109,15 @@ class SimpleHoster(Hoster): FILE_SIZE_REPLACEMENTS = [] FILE_NAME_REPLACEMENTS = [("&#?\w+;", fixup)] FILE_URL_REPLACEMENTS = [] + + HTML_BROKEN_ENCODING = False def setup(self): self.resumeDownload = self.multiDL = True if self.account else False def process(self, pyfile): pyfile.url = reSub(pyfile.url, self.FILE_URL_REPLACEMENTS) - self.html = self.load(pyfile.url, decode = True) + self.html = self.load(pyfile.url, decode = False if self.HTML_BROKEN_ENCODING else True) self.file_info = self.getFileInfo() if self.premium: self.handlePremium() -- cgit v1.2.3 From 78d238ccb21a5925a5ba730808c176a5607ee867 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Wed, 25 Jan 2012 20:04:44 +0100 Subject: fix fixed hoster fix --- module/plugins/internal/DeadHoster.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'module') diff --git a/module/plugins/internal/DeadHoster.py b/module/plugins/internal/DeadHoster.py index 2de1634b9..e180e2384 100644 --- a/module/plugins/internal/DeadHoster.py +++ b/module/plugins/internal/DeadHoster.py @@ -2,18 +2,17 @@ from module.plugins.Hoster import Hoster as _Hoster def create_getInfo(plugin): def getInfo(urls): - for url in urls: - yield '#N/A: ' + url, 0, 1, url + yield [('#N/A: ' + url, 0, 1, url) for url in urls] return getInfo -class Hoster(_Hoster): +class DeadHoster(_Hoster): __name__ = "DeadHoster" __type__ = "hoster" __pattern__ = r"" - __version__ = "0.1" + __version__ = "0.11" __description__ = """Hoster is no longer available""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") - def init(self): - self.fail("Hoster is no longer available") \ No newline at end of file + def setup(self): + self.fail("Hoster is no longer available") \ No newline at end of file -- cgit v1.2.3 From 4e34bdf81680b9b8758680207a6e7af290eafbef Mon Sep 17 00:00:00 2001 From: Jeix Date: Fri, 27 Jan 2012 15:26:28 +0100 Subject: Youtube Format fix --- module/plugins/hoster/YoutubeCom.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module') diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py index 2b3ea7ed7..3d204895b 100644 --- a/module/plugins/hoster/YoutubeCom.py +++ b/module/plugins/hoster/YoutubeCom.py @@ -64,18 +64,18 @@ class YoutubeCom(Hoster): if self.getConfig("fmt"): desired_fmt = self.getConf("fmt") - flashvars = re.search(r"flashvars=\"([^\"]+)", html) + flashvars = re.search(r'flashvars=\\"(.*?)\\"', html) flashvars = unquote(flashvars.group(1)) - fmts = re.findall(r"itag=(\d+),url=([^&]+)", flashvars) - + fmts = re.findall(r'url=(.*?)%3B.*?itag=(\d+)', flashvars) fmt_dict = {} - for fmt, url in fmts: + for url, fmt in fmts: fmt = int(fmt) fmt_dict[fmt] = unquote(url) + self.logDebug("Found links: %s" % fmt_dict) - for fmt in fmt_dict.keys(): + for fmt in fmt_dict.keys(): if fmt not in self.formats: self.logDebug("FMT not supported: %s" % fmt) del fmt_dict[fmt] -- cgit v1.2.3 From 7312fb0197650a329d5343b1ef16ddb27cc3fa70 Mon Sep 17 00:00:00 2001 From: Jeix Date: Fri, 27 Jan 2012 20:56:18 +0100 Subject: youtube increase version number --- module/plugins/hoster/YoutubeCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module') diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py index 3d204895b..222e9bf84 100644 --- a/module/plugins/hoster/YoutubeCom.py +++ b/module/plugins/hoster/YoutubeCom.py @@ -11,7 +11,7 @@ class YoutubeCom(Hoster): __name__ = "YoutubeCom" __type__ = "hoster" __pattern__ = r"http://(www\.)?(de\.)?\youtube\.com/watch\?v=.*" - __version__ = "0.24" + __version__ = "0.25" __config__ = [("quality", "sd;hd;fullhd", "Quality Setting", "hd"), ("fmt", "int", "FMT Number 0-45", 0), (".mp4", "bool", "Allow .mp4", True), -- cgit v1.2.3 From 12607b8eaa119e605bd10afed1b95141660a8e5e Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Sun, 29 Jan 2012 11:43:48 +0100 Subject: update filepost --- module/plugins/hoster/FilepostCom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module') diff --git a/module/plugins/hoster/FilepostCom.py b/module/plugins/hoster/FilepostCom.py index d12fad738..834ad7199 100644 --- a/module/plugins/hoster/FilepostCom.py +++ b/module/plugins/hoster/FilepostCom.py @@ -26,14 +26,14 @@ class FilepostCom(SimpleHoster): __name__ = "FilepostCom" __type__ = "hoster" __pattern__ = r"https?://(?:www\.)?(?:filepost\.com/files|fp.io)/([^/]+).*" - __version__ = "0.25" + __version__ = "0.26" __description__ = """Filepost.com plugin - free only""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") FILE_INFO_PATTERN = r']*>(?P[^>]+?) - (?P[0-9\.]+ [kKMG]i?B)\' class="inp_text"/>' #FILE_INFO_PATTERN = r'

(?P[^<]+)

\s*
\s*
    \s*
  • Size: (?P[0-9.]+) (?P[kKMG])i?B
  • ' - FILE_OFFLINE_PATTERN = r'class="error_msg_title"> Invalid or Deleted File.
' + FILE_OFFLINE_PATTERN = r'class="error_msg_title"> Invalid or Deleted File. |
' RECAPTCHA_KEY_PATTERN = r"Captcha.init\({\s*key:\s*'([^']+)'" FLP_TOKEN_PATTERN = r"set_store_options\({token: '([^']+)'" @@ -80,8 +80,8 @@ class FilepostCom(SimpleHoster): for pokus in range(5): get_dict['JsHttpRequest'] = str(int(time()*10000)) + '-xml' if pokus: - post_dict["recaptcha_challenge_field"], post_dict["captcha_response_field"] = recaptcha.challenge(captcha_key) - self.logDebug(u"RECAPTCHA: %s : %s : %s" % (captcha_key, post_dict["recaptcha_challenge_field"], post_dict["captcha_response_field"])) + post_dict["recaptcha_challenge_field"], post_dict["recaptcha_response_field"] = recaptcha.challenge(captcha_key) + self.logDebug(u"RECAPTCHA: %s : %s : %s" % (captcha_key, post_dict["recaptcha_challenge_field"], post_dict["recaptcha_response_field"])) download_url = self.getJsonResponse(get_dict, post_dict, 'link') if download_url: -- 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') 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') 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') 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') 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