From b8e165f35383b247a7248edabde2b2145a4a32dd Mon Sep 17 00:00:00 2001 From: Jeix Date: Sat, 24 Dec 2011 12:14:10 +0100 Subject: OronCom improve --- module/plugins/hoster/OronCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/OronCom.py b/module/plugins/hoster/OronCom.py index e3e157a6d..0be840d76 100755 --- a/module/plugins/hoster/OronCom.py +++ b/module/plugins/hoster/OronCom.py @@ -33,12 +33,12 @@ class OronCom(Hoster): __name__ = "OronCom" __type__ = "hoster" __pattern__ = r"http://(?:www.)?oron.com/" - __version__ = "0.12" + __version__ = "0.13" __description__ = "File Hoster: Oron.com" __author_name__ = ("chrox", "DHMH") __author_mail__ = ("chrox@pyload.org", "DHMH@pyload.org") - FILE_INFO_PATTERN = r'Dateiname: (.*)
Größe: ([0-9,.]+) (Kb|Mb|Gb)' + FILE_INFO_PATTERN = r'(?:Filename|Dateiname): (.*?)\s*
\s*(?:Größe|File size): ([0-9,\.]+) (Kb|Mb|Gb)' def init(self): self.resumeDownload = self.multiDL = True if self.account else False -- cgit v1.2.3 From ee1f2cff41825628a71a46a544d0ef893f50c6a3 Mon Sep 17 00:00:00 2001 From: Jeix Date: Mon, 26 Dec 2011 22:54:18 +0100 Subject: Filesonic --- module/plugins/hoster/FilesonicCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/FilesonicCom.py b/module/plugins/hoster/FilesonicCom.py index 813333acb..650addf61 100644 --- a/module/plugins/hoster/FilesonicCom.py +++ b/module/plugins/hoster/FilesonicCom.py @@ -54,7 +54,7 @@ class FilesonicCom(Hoster): API_ADDRESS = "http://api.filesonic.com" URL_DOMAIN_PATTERN = r'(?P.*?)(?P.(filesonic|sharingmatrix)\..+?)(?P/.*)' FILE_ID_PATTERN = r'/file/(?P([a-z][0-9]+/)?[0-9]+)(/.*)?' #change may break wupload - be careful - FILE_LINK_PATTERN = r'

Start download' + FILE_LINK_PATTERN = r'Start Download' WAIT_TIME_PATTERN = r'countDownDelay = (?P\d+)' WAIT_TM_PATTERN = r"name='tm' value='(.*?)' />" WAIT_TM_HASH_PATTERN = r"name='tm_hash' value='(.*?)' />" -- cgit v1.2.3 From d863b087394bbc911f4aee1c3399d0040e95a2bc Mon Sep 17 00:00:00 2001 From: RaNaN Date: Wed, 28 Dec 2011 21:37:45 +0100 Subject: fso update --- module/plugins/hoster/FilesonicCom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/FilesonicCom.py b/module/plugins/hoster/FilesonicCom.py index 650addf61..8f8c9b43d 100644 --- a/module/plugins/hoster/FilesonicCom.py +++ b/module/plugins/hoster/FilesonicCom.py @@ -45,15 +45,15 @@ def getId(url): class FilesonicCom(Hoster): __name__ = "FilesonicCom" __type__ = "hoster" - __pattern__ = r"http://[\w\.]*?(sharingmatrix|filesonic)\..*?/file/(([a-z][0-9]+/)?[0-9]+)(/.*)?" - __version__ = "0.33" + __pattern__ = r"http://[\w\.]*?(sharingmatrix|filesonic)\..*?/.*?file/([a-zA-Z0-9]+(/.+)?|[a-z0-9]+/[0-9]+(/.+)?|[0-9]+(/.+)?)" + __version__ = "0.34" __description__ = """FilesonicCom und Sharingmatrix Download Hoster""" __author_name__ = ("jeix", "paulking") __author_mail__ = ("jeix@hasnomail.de", "") API_ADDRESS = "http://api.filesonic.com" URL_DOMAIN_PATTERN = r'(?P.*?)(?P.(filesonic|sharingmatrix)\..+?)(?P/.*)' - FILE_ID_PATTERN = r'/file/(?P([a-z][0-9]+/)?[0-9]+)(/.*)?' #change may break wupload - be careful + FILE_ID_PATTERN = r'/file/(?P([a-zA-Z0-9]+/)?[0-9]+)(/.*)?' #change may break wupload - be careful FILE_LINK_PATTERN = r'Start Download' WAIT_TIME_PATTERN = r'countDownDelay = (?P\d+)' WAIT_TM_PATTERN = r"name='tm' value='(.*?)' />" -- cgit v1.2.3 From c3b31113508a687d0070f54951f53f9cd458f734 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Wed, 28 Dec 2011 22:07:05 +0100 Subject: little fix --- module/plugins/hoster/FilesonicCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/FilesonicCom.py b/module/plugins/hoster/FilesonicCom.py index 8f8c9b43d..fd6a1b833 100644 --- a/module/plugins/hoster/FilesonicCom.py +++ b/module/plugins/hoster/FilesonicCom.py @@ -28,7 +28,7 @@ def getInfo(urls): response = json_loads(getURL(check_url, decode=True)) for item in response["FSApi_Link"]["getInfo"]["response"]["links"]: if item["status"] != "AVAILABLE": - result.append((None, 0, 1, ids[str(item["id"])])) + result.append((ids[str(item["id"])], 0, 1, ids[str(item["id"])])) else: result.append((item["filename"], item["size"], 2, ids[str(item["id"])])) yield result -- cgit v1.2.3 From 79695028c05e30b114c7933b805b191f5c3f97e0 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 29 Dec 2011 00:44:20 +0100 Subject: closed #479 --- module/plugins/hoster/MegauploadCom.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/MegauploadCom.py b/module/plugins/hoster/MegauploadCom.py index 100553ebf..6b5d10729 100644 --- a/module/plugins/hoster/MegauploadCom.py +++ b/module/plugins/hoster/MegauploadCom.py @@ -65,7 +65,7 @@ class MegauploadCom(Hoster): __name__ = "MegauploadCom" __type__ = "hoster" __pattern__ = r"http://[\w\.]*?(megaupload)\.com/.*?(\?|&)d=(?P[0-9A-Za-z]+)" - __version__ = "0.28" + __version__ = "0.3" __description__ = """Megaupload.com Download Hoster""" __author_name__ = ("spoob") __author_mail__ = ("spoob@pyload.org") @@ -74,6 +74,7 @@ class MegauploadCom(Hoster): API_STATUS_MAPPING = {"0": statusMap['online'], "1": statusMap['offline'], "3": statusMap['temp. offline']} FILE_URL_PATTERN = r'' def init(self): self.html = [None, None] @@ -125,12 +126,12 @@ class MegauploadCom(Hoster): 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(r'href=\"(http://[^\"]*?)\" class=\"down_ad_butt1\">', page).group(1)) + self.download(re.search(self.PREMIUM_URL_PATTERN, page).group(1)) return else: raise - check = self.checkDownload({"dllink": re.compile(r'href=\"(http://[^\"]*?)\" class=\"down_ad_butt1\">')}) + 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")) @@ -270,4 +271,4 @@ class MegauploadCom(Hoster): if re.search("The password you have entered is not correct", self.html[1]): self.fail(_("Wrong password for download link.")) - return True \ No newline at end of file + return True -- cgit v1.2.3 From c87e1f49ec8605f23960e001a449202d009c951b Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 29 Dec 2011 11:52:44 +0100 Subject: fix from Lino24 --- module/plugins/hoster/FilesonicCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/FilesonicCom.py b/module/plugins/hoster/FilesonicCom.py index fd6a1b833..a878c45b3 100644 --- a/module/plugins/hoster/FilesonicCom.py +++ b/module/plugins/hoster/FilesonicCom.py @@ -53,8 +53,8 @@ class FilesonicCom(Hoster): API_ADDRESS = "http://api.filesonic.com" URL_DOMAIN_PATTERN = r'(?P.*?)(?P.(filesonic|sharingmatrix)\..+?)(?P/.*)' - FILE_ID_PATTERN = r'/file/(?P([a-zA-Z0-9]+/)?[0-9]+)(/.*)?' #change may break wupload - be careful - FILE_LINK_PATTERN = r'Start Download' + FILE_ID_PATTERN = r'/file/(?P([a-z][0-9]+/)?[a-zA-Z0-9\-._+]+)(/.*)?' #change may break wupload - be careful + FILE_LINK_PATTERN = r'

Start download' WAIT_TIME_PATTERN = r'countDownDelay = (?P\d+)' WAIT_TM_PATTERN = r"name='tm' value='(.*?)' />" WAIT_TM_HASH_PATTERN = r"name='tm_hash' value='(.*?)' />" -- cgit v1.2.3 From c561ffac98e3e15e43fee3debd8b765ac36113e8 Mon Sep 17 00:00:00 2001 From: Jeix Date: Thu, 29 Dec 2011 12:47:45 +0100 Subject: fso free user fix --- module/plugins/hoster/FilesonicCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/FilesonicCom.py b/module/plugins/hoster/FilesonicCom.py index a878c45b3..736b5b96b 100644 --- a/module/plugins/hoster/FilesonicCom.py +++ b/module/plugins/hoster/FilesonicCom.py @@ -54,7 +54,7 @@ class FilesonicCom(Hoster): API_ADDRESS = "http://api.filesonic.com" URL_DOMAIN_PATTERN = r'(?P.*?)(?P.(filesonic|sharingmatrix)\..+?)(?P/.*)' FILE_ID_PATTERN = r'/file/(?P([a-z][0-9]+/)?[a-zA-Z0-9\-._+]+)(/.*)?' #change may break wupload - be careful - FILE_LINK_PATTERN = r'

Start download' + FILE_LINK_PATTERN = r'Start Download' WAIT_TIME_PATTERN = r'countDownDelay = (?P\d+)' WAIT_TM_PATTERN = r"name='tm' value='(.*?)' />" WAIT_TM_HASH_PATTERN = r"name='tm_hash' value='(.*?)' />" -- cgit v1.2.3 From c79762afb617604e9e55c3bebde59ff850885ed7 Mon Sep 17 00:00:00 2001 From: CryNickSystems Date: Fri, 30 Dec 2011 20:57:35 +0100 Subject: OronCom fix - thx petrucci77 --- module/plugins/hoster/OronCom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/OronCom.py b/module/plugins/hoster/OronCom.py index 0be840d76..0b547e516 100755 --- a/module/plugins/hoster/OronCom.py +++ b/module/plugins/hoster/OronCom.py @@ -15,7 +15,7 @@ def getInfo(urls): result.append((url, 0, 1, url)) continue - m = re.search(OronCom.FILE_INFO_PATTERN, html) + m = re.search(OronCom.FILE_INFO_PATTERN, html, re.MULTILINE) if m: name = m.group(1) hSize = float(m.group(2).replace(",", ".")) @@ -33,10 +33,10 @@ class OronCom(Hoster): __name__ = "OronCom" __type__ = "hoster" __pattern__ = r"http://(?:www.)?oron.com/" - __version__ = "0.13" + __version__ = "0.14" __description__ = "File Hoster: Oron.com" __author_name__ = ("chrox", "DHMH") - __author_mail__ = ("chrox@pyload.org", "DHMH@pyload.org") + __author_mail__ = ("chrox@pyload.org", "webmaster@pcProfil.de") FILE_INFO_PATTERN = r'(?:Filename|Dateiname): (.*?)\s*
\s*(?:Größe|File size): ([0-9,\.]+) (Kb|Mb|Gb)' -- cgit v1.2.3 From 503cff86eb5e5b902291f5995838f1facd84319c Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Thu, 5 Jan 2012 01:12:23 +0100 Subject: merge in plugin updates --- module/plugins/hoster/CrockoCom.py | 5 +- module/plugins/hoster/EasybytezCom.py | 100 +++++++++++++++++++++++++++++++--- module/plugins/hoster/FilesonicCom.py | 6 +- module/plugins/hoster/MediafireCom.py | 6 +- 4 files changed, 101 insertions(+), 16 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/CrockoCom.py b/module/plugins/hoster/CrockoCom.py index 9598025ec..bf058b613 100644 --- a/module/plugins/hoster/CrockoCom.py +++ b/module/plugins/hoster/CrockoCom.py @@ -9,12 +9,13 @@ class CrockoCom(SimpleHoster): __name__ = "CrockoCom" __type__ = "hoster" __pattern__ = r"http://(www\.)?(crocko|easy-share).com/.*" - __version__ = "0.11" + __version__ = "0.12" __description__ = """Crocko Download Hoster""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") - FILE_INFO_PATTERN = r'(?P.*)\s*(?P[0-9,.]+) (?P[kKMG])i?B' + FILE_NAME_PATTERN = r'Download:\s*(?P.*)' + FILE_NAME_PATTERN = r'(?P[^<]+)' FILE_OFFLINE_PATTERN = r"

Sorry,
the page you're looking for
isn't here.

" DOWNLOAD_URL_PATTERN = r"window.location ='([^']+)';" CAPTCHA_URL_PATTERN = re.compile(r"u='(/file_contents/captcha/\w+)';\s*w='(\d+)';") diff --git a/module/plugins/hoster/EasybytezCom.py b/module/plugins/hoster/EasybytezCom.py index 5858dd935..3ee2e9ba5 100644 --- a/module/plugins/hoster/EasybytezCom.py +++ b/module/plugins/hoster/EasybytezCom.py @@ -18,12 +18,13 @@ import re from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from random import random class EasybytezCom(SimpleHoster): __name__ = "EasybytezCom" __type__ = "hoster" __pattern__ = r"http://(?:\w*\.)?easybytez.com/(\w+).*" - __version__ = "0.01" + __version__ = "0.04" __description__ = """easybytez.com""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") @@ -32,29 +33,112 @@ class EasybytezCom(SimpleHoster): FILE_NAME_PATTERN = r'[^<]+ \((?P[^<]+)\)' + FILE_INFO_PATTERN = r'Filename:(?P[^<]+)\s*.*?\((?P[^<]+)\)' FILE_OFFLINE_PATTERN = r'

File Not Found

' - FORM_INPUT_PATTERN = r']* name="([^"]+)" value="([^"]*)">' + FORM_INPUT_PATTERN = r']* name="([^"]+)"[^>]*value="([^"]*)"' WAIT_PATTERN = r'[^>]*>(\d+) seconds' + DIRECT_LINK_PATTERN = r'(http://\w+\.easybytez\.com/files/\d+/\w+/[^"<]+)' + FORM_PATTERN = r'
]*action=["\']?([^"\' ]+)(.*?)
' + OVR_DOWNLOAD_LINK_PATTERN = r'

Download Link

\s*]*>([^<]+)' + OVR_KILL_LINK_PATTERN = r'

Delete Link

\s*]*>([^<]+)' + TEXTAREA_PATTERN = r"" + + HOSTER_URL = "www.easybytez.com" + + def process(self, pyfile): + if not re.match(self.__pattern__, self.pyfile.url): + if self.premium: + self.handleOverriden() + else: + self.fail("Only premium users can download from other hosters with %s" % self.HOSTER_URL) + else: + self.html = self.load(pyfile.url, cookies = False, decode = True) + self.file_info = self.getFileInfo() + + header = self.load(self.pyfile.url, just_header = True, cookies = True) + self.logDebug(header) + + if 'location' in header and re.match(self.DIRECT_LINK_PATTERN, header['location']): + self.downloadLink(header['location']) + elif self.premium: + self.handlePremium() + else: + self.handleFree() + def handleFree(self): self.download(self.pyfile.url, post = self.getPostParameters(), ref = True, cookies = True) + + def handlePremium(self): + self.html = self.load(self.pyfile.url, post = self.getPostParameters(premium=True)) + found = re.search(self.DIRECT_LINK_PATTERN, self.html) + if not found: self.parseError('DIRECT LINK') + self.downloadLink(found.group(1)) + + def handleOverriden(self): + self.html = self.load(self.HOSTER_URL) + action, form = re.search(self.FORM_PATTERN % "url", self.html, re.DOTALL).groups() + inputs = dict(re.findall(self.FORM_INPUT_PATTERN, form)) + upload_id = "%012d" % int(random()*10**12) + action += upload_id + "&js_on=1&utype=prem&upload_type=url" + inputs['tos'] = '1' + inputs['url_mass'] = self.pyfile.url + inputs['up1oad_type'] = 'url' + + self.logDebug(action, inputs) + self.html = self.load(action, post = inputs) - def getPostParameters(self): + found = re.search(self.FORM_PATTERN % "F1", self.html, re.S | re.I) + if not found: + self.logDebug(self.html) + self.fail("upload failed") + action, form = found.groups() + + inputs = dict(re.findall(self.TEXTAREA_PATTERN, form)) + if not inputs: parseError('TEXTAREA') + self.logDebug(inputs) + if inputs['st'] == 'OK': + self.html = self.load(action, post = inputs) + else: + self.fail(inputs['st']) + + found = re.search(self.OVR_DOWNLOAD_LINK_PATTERN, self.html) + if not found: self.parseError('DIRECT LINK (OVR)') + self.pyfile.url = found.group(1) + self.retry() + + def downloadLink(self, link): + self.logDebug('DIRECT LINK: %s' % link) + self.download(link) + + def getPostParameters(self, premium=False): inputs = dict(re.findall(self.FORM_INPUT_PATTERN, self.html)) self.logDebug(inputs) - inputs['method_free'] = "Free Download" + + if 'op' in inputs and inputs['op'] == 'download2': return inputs + inputs['referer'] = self.pyfile.url - if 'method_premium' in inputs: del inputs['method_premium'] + + if premium: + inputs['method_premium'] = "Premium Download" + if 'method_free' in inputs: del inputs['method_free'] + else: + inputs['method_free'] = "Free Download" + if 'method_premium' in inputs: del inputs['method_premium'] self.html = self.load(self.pyfile.url, post = inputs, ref = True, cookies = True) inputs = dict(re.findall(self.FORM_INPUT_PATTERN, self.html)) self.logDebug(inputs) - found = re.search(self.WAIT_PATTERN, self.html) - self.setWait(int(found.group(1)) + 1 if found else 60) - self.wait() + if not premium: + found = re.search(self.WAIT_PATTERN, self.html) + self.setWait(int(found.group(1)) + 1 if found else 60) + self.wait() return inputs + + def urlParseFileName(self): + return html_unescape(urlparse(self.pyfile.url).path.split("/")[-1]) getInfo = create_getInfo(EasybytezCom) \ No newline at end of file diff --git a/module/plugins/hoster/FilesonicCom.py b/module/plugins/hoster/FilesonicCom.py index 736b5b96b..6094859ef 100644 --- a/module/plugins/hoster/FilesonicCom.py +++ b/module/plugins/hoster/FilesonicCom.py @@ -28,7 +28,7 @@ def getInfo(urls): 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"])])) + result.append((None, 0, 1, ids[str(item["id"])])) else: result.append((item["filename"], item["size"], 2, ids[str(item["id"])])) yield result @@ -45,7 +45,7 @@ def getId(url): 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]+(/.+)?)" + __pattern__ = r"http://[\w\.]*?(sharingmatrix|filesonic)\..*?/file/(([a-z][0-9]+/)?[a-zA-Z0-9\-._+]+)(/.*)?" __version__ = "0.34" __description__ = """FilesonicCom und Sharingmatrix Download Hoster""" __author_name__ = ("jeix", "paulking") @@ -54,7 +54,7 @@ class FilesonicCom(Hoster): API_ADDRESS = "http://api.filesonic.com" URL_DOMAIN_PATTERN = r'(?P.*?)(?P.(filesonic|sharingmatrix)\..+?)(?P/.*)' FILE_ID_PATTERN = r'/file/(?P([a-z][0-9]+/)?[a-zA-Z0-9\-._+]+)(/.*)?' #change may break wupload - be careful - FILE_LINK_PATTERN = r'
Start Download' + FILE_LINK_PATTERN = r'

Start download' WAIT_TIME_PATTERN = r'countDownDelay = (?P\d+)' WAIT_TM_PATTERN = r"name='tm' value='(.*?)' />" WAIT_TM_HASH_PATTERN = r"name='tm_hash' value='(.*?)' />" diff --git a/module/plugins/hoster/MediafireCom.py b/module/plugins/hoster/MediafireCom.py index 484b48ba6..14180ff3d 100644 --- a/module/plugins/hoster/MediafireCom.py +++ b/module/plugins/hoster/MediafireCom.py @@ -58,20 +58,20 @@ class MediafireCom(SimpleHoster): __name__ = "MediafireCom" __type__ = "hoster" __pattern__ = r"http://(?:\w*\.)*mediafire\.com/[^?].*" - __version__ = "0.70" + __version__ = "0.71" __description__ = """Mediafire.com plugin - free only""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") DOWNLOAD_LINK_PATTERN = r'

' def process(self, pyfile): -- cgit v1.2.3 From ee844b877a82487b0c90f2ed3955a7455438e3c2 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Thu, 5 Jan 2012 09:35:01 +0100 Subject: revert fso --- module/plugins/hoster/FilesonicCom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/FilesonicCom.py b/module/plugins/hoster/FilesonicCom.py index 6094859ef..736b5b96b 100644 --- a/module/plugins/hoster/FilesonicCom.py +++ b/module/plugins/hoster/FilesonicCom.py @@ -28,7 +28,7 @@ def getInfo(urls): response = json_loads(getURL(check_url, decode=True)) for item in response["FSApi_Link"]["getInfo"]["response"]["links"]: if item["status"] != "AVAILABLE": - result.append((None, 0, 1, ids[str(item["id"])])) + result.append((ids[str(item["id"])], 0, 1, ids[str(item["id"])])) else: result.append((item["filename"], item["size"], 2, ids[str(item["id"])])) yield result @@ -45,7 +45,7 @@ def getId(url): class FilesonicCom(Hoster): __name__ = "FilesonicCom" __type__ = "hoster" - __pattern__ = r"http://[\w\.]*?(sharingmatrix|filesonic)\..*?/file/(([a-z][0-9]+/)?[a-zA-Z0-9\-._+]+)(/.*)?" + __pattern__ = r"http://[\w\.]*?(sharingmatrix|filesonic)\..*?/.*?file/([a-zA-Z0-9]+(/.+)?|[a-z0-9]+/[0-9]+(/.+)?|[0-9]+(/.+)?)" __version__ = "0.34" __description__ = """FilesonicCom und Sharingmatrix Download Hoster""" __author_name__ = ("jeix", "paulking") @@ -54,7 +54,7 @@ class FilesonicCom(Hoster): API_ADDRESS = "http://api.filesonic.com" URL_DOMAIN_PATTERN = r'(?P.*?)(?P.(filesonic|sharingmatrix)\..+?)(?P/.*)' FILE_ID_PATTERN = r'/file/(?P([a-z][0-9]+/)?[a-zA-Z0-9\-._+]+)(/.*)?' #change may break wupload - be careful - FILE_LINK_PATTERN = r'
[^<]*
File not found
' - def setup(self): - self.resumeDownload = self.multiDL = True if self.account else False - self.chunkLimit = 1 + def handleFree(self): + action, inputs = self.parseHtmlForm('id="ifree_form"') + if not action: self.parseError("page 1 / ifree_form") + self.pyfile.size = float(inputs['sssize']) + #self.logDebug(action, inputs) + inputs['desc'] = "" - def process(self, pyfile): - self.html = self.load(pyfile.url, decode=True) - if re.search(self.FILE_OFFLINE_PATTERN, self.html): self.offline() + self.html = self.load("http://letitbit.net" + action, post = inputs, cookies = True) - try: - action, form = re.search(self.FORM_PATTERN % (' id="ifree_form"', ''), self.html, re.DOTALL).groups() - inputs = dict(re.findall(self.FORM_INPUT_PATTERN, form)) - pyfile.name = inputs['name'] - pyfile.size = float(inputs['sssize'])/1024 - except Exception, e: - self.logError(e) - self.parseError("page 1 / ifree_form") + action, inputs = self.parseHtmlForm('id="d3_form"') + if not action: self.parseError("page 2 / d3_form") + #self.logDebug(action, inputs) - #self.logDebug(inputs) - inputs['desc'] = "" - self.html = self.load("http://letitbit.net" + action, post = inputs) - - try: - action, form = re.search(self.FORM_PATTERN % ('', ' id="d3_form"'), self.html, re.DOTALL).groups() - inputs = dict(re.findall(self.FORM_INPUT_PATTERN, form)) - except Exception, e: - self.logError(e) - self.parseError("page 2 / d3_form") + self.html = self.load(action, post = inputs, cookies = True) - self.html = self.load(action, post = inputs) try: - ajax_check_url = re.search(self.CHECK_URL_PATTERN, self.html).group(1) + ajax_check_url, captcha_url = re.search(self.CHECK_URL_PATTERN, self.html).groups() found = re.search(self.SECONDS_PATTERN, self.html) seconds = int(found.group(1)) if found else 60 self.setWait(seconds+1) @@ -75,7 +60,22 @@ class LetitbitNet(SimpleHoster): self.logError(e) self.parseError("page 3 / js") - download_url = self.load(ajax_check_url, post = inputs) + response = self.load(ajax_check_url, post = inputs, cookies = True) + if response != '1': self.fail('Unknown response (ajax_check_url)') + + for i in range(5): + captcha = self.decryptCaptcha('%s/captcha_new.php?rand=%d' % (captcha_url, random() * 100000), cookies = True) + response = self.load(captcha_url + '/ajax/check_captcha.php', post = {"code": captcha}, cookies = True) + self.logDebug(response) + if response.startswith('http://'): + download_url = response + self.correctCaptcha() + break + else: + self.invalidCaptcha() + else: + self.fail("No valid captcha solution received") + self.download(download_url) getInfo = create_getInfo(LetitbitNet) \ No newline at end of file -- cgit v1.2.3 From 6c653c5eb10a4b77f2e63ad1e745ba612a46ae03 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Sun, 8 Jan 2012 10:48:53 +0100 Subject: add premium4.me --- module/plugins/hoster/Premium4Me.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 module/plugins/hoster/Premium4Me.py (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/Premium4Me.py b/module/plugins/hoster/Premium4Me.py new file mode 100644 index 000000000..1d97e21b1 --- /dev/null +++ b/module/plugins/hoster/Premium4Me.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from urllib import quote +from module.plugins.Hoster import Hoster + +class Premium4Me(Hoster): + __name__ = "Premium4Me" + __version__ = "0.01" + __type__ = "hoster" + + __pattern__ = r"http://premium4.me/.*" + __description__ = """premium4.me hoster plugin""" + __author_name__ = ("RaNaN", "zoidberg") + __author_mail__ = ("RaNaN@pyload.org", "zoidberg@mujmail.cz") + + def setup(self): + self.chunkLimit = 3 + self.resumeDownload = True + + def process(self, pyfile): + if not self.account: + self.logError(_("Please enter your premium4.me account or deactivate this plugin")) + self.fail("No premium4.me account provided") + + self.log.debug("premium4.me: Old URL: %s" % pyfile.url) + new_url = "http://premium4.me/api/getfile.php?authcode=%s&link=%s" % (self.account.authcode, quote(pyfile.url, "")) + + #raise timeout to 2min + self.req.setOption("timeout", 120) + + self.download(new_url, disposition=True) \ No newline at end of file -- cgit v1.2.3 From 10a945f94ddf44486f8d876aa355ba75cb8b7d46 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Tue, 10 Jan 2012 02:01:53 +0100 Subject: closed #491 mf, fix mu password --- module/plugins/hoster/MediafireCom.py | 50 ++++++++++++++++++++-------------- module/plugins/hoster/MegauploadCom.py | 4 +-- 2 files changed, 32 insertions(+), 22 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/MediafireCom.py b/module/plugins/hoster/MediafireCom.py index 14180ff3d..f970512ab 100644 --- a/module/plugins/hoster/MediafireCom.py +++ b/module/plugins/hoster/MediafireCom.py @@ -58,12 +58,12 @@ class MediafireCom(SimpleHoster): __name__ = "MediafireCom" __type__ = "hoster" __pattern__ = r"http://(?:\w*\.)*mediafire\.com/[^?].*" - __version__ = "0.71" + __version__ = "0.72" __description__ = """Mediafire.com plugin - free only""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") - DOWNLOAD_LINK_PATTERN = r'

Start download' + FILE_LINK_PATTERN = r'Start Download' WAIT_TIME_PATTERN = r'countDownDelay = (?P\d+)' WAIT_TM_PATTERN = r"name='tm' value='(.*?)' />" WAIT_TM_HASH_PATTERN = r"name='tm_hash' value='(.*?)' />" -- cgit v1.2.3 From a65f5b27948da38a1c725be5c8cb0d7844788319 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Thu, 5 Jan 2012 18:03:04 +0100 Subject: fix hotfile, 4shared --- module/plugins/hoster/FourSharedCom.py | 4 ++-- module/plugins/hoster/HotfileCom.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/FourSharedCom.py b/module/plugins/hoster/FourSharedCom.py index b1cc252e2..2b27eed28 100644 --- a/module/plugins/hoster/FourSharedCom.py +++ b/module/plugins/hoster/FourSharedCom.py @@ -8,7 +8,7 @@ class FourSharedCom(SimpleHoster): __name__ = "FourSharedCom" __type__ = "hoster" __pattern__ = r"http://[\w\.]*?4shared(-china)?\.com/(account/)?(download|get|file|document|photo|video|audio)/.+?/.*" - __version__ = "0.24" + __version__ = "0.25" __description__ = """4Shared Download Hoster""" __author_name__ = ("jeix", "zoidberg") __author_mail__ = ("jeix@hasnomail.de", "zoidberg@mujmail.cz") @@ -19,7 +19,7 @@ class FourSharedCom(SimpleHoster): FILE_NAME_REPLACEMENTS = [(r"&#(\d+).", lambda m: unichr(int(m.group(1))))] DOWNLOAD_BUTTON_PATTERN = '\s*Download file now" def handleFree(self): found = re.search(self.DOWNLOAD_BUTTON_PATTERN, self.html) diff --git a/module/plugins/hoster/HotfileCom.py b/module/plugins/hoster/HotfileCom.py index 9c056d899..1447e7c9e 100644 --- a/module/plugins/hoster/HotfileCom.py +++ b/module/plugins/hoster/HotfileCom.py @@ -32,7 +32,7 @@ class HotfileCom(Hoster): __name__ = "HotfileCom" __type__ = "hoster" __pattern__ = r"http://(www.)?hotfile\.com/dl/\d+/[0-9a-zA-Z]+/" - __version__ = "0.31" + __version__ = "0.32" __description__ = """Hotfile.com Download Hoster""" __author_name__ = ("sitacuisses","spoob","mkaay") __author_mail__ = ("sitacuisses@yhoo.de","spoob@pyload.org","mkaay@mkaay.de") @@ -57,7 +57,7 @@ class HotfileCom(Hoster): elif self.account and login: return self.account.apiCall(method, post, self.user) post.update({"action": method}) - return self.load("http://api.hotfile.com/", post=post) + return self.load("http://api.hotfile.com/", post=post, decode=True) def process(self, pyfile): self.wantReconnect = False @@ -100,7 +100,7 @@ class HotfileCom(Hoster): self.fail("Form not found in HTML. Can not proceed.") form_content = form_content.group(0) - form_posts = re.findall(r"", form_content) + form_posts = dict(re.findall(r"", form_content)) self.html[1] = self.load(self.pyfile.url, post=form_posts) -- cgit v1.2.3 From 25c169d8a6029a54cd86fcb125dbf2a5d1cd5f9a Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Fri, 6 Jan 2012 14:39:30 +0100 Subject: update letitbit.net --- module/plugins/hoster/LetitbitNet.py | 64 ++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/LetitbitNet.py b/module/plugins/hoster/LetitbitNet.py index 8ac4b8f7f..4ff2b9750 100644 --- a/module/plugins/hoster/LetitbitNet.py +++ b/module/plugins/hoster/LetitbitNet.py @@ -17,56 +17,41 @@ """ import re +from random import random from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class LetitbitNet(SimpleHoster): __name__ = "LetitbitNet" __type__ = "hoster" __pattern__ = r"http://(?:\w*\.)*letitbit.net/download/.*" - __version__ = "0.12" + __version__ = "0.13" __description__ = """letitbit.net""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") - FORM_PATTERN = r'(.*?)' - FORM_INPUT_PATTERN = r']* name="([^"]+)" value="([^"]+)" />' - CHECK_URL_PATTERN = r"ajax_check_url\s*=\s*'([^']+)';" + CHECK_URL_PATTERN = r"ajax_check_url\s*=\s*'((http://[^/]+)[^']+)';" SECONDS_PATTERN = r"seconds\s*=\s*(\d+);" - FILE_INFO_PATTERN = r']*>File: ]*>(?P[^<]+) [(?P[0-9.]+)\s*(?P[kKMG])i?[Bb]]' + FILE_INFO_PATTERN = r']*>File: ]*>(?P[^<]+)\s*\[(?P[^<]+)]' FILE_OFFLINE_PATTERN = r'