From 543df32e61d61315b7d709b5a623c17d3dc91f49 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Sun, 4 Nov 2012 10:18:55 +0100 Subject: fix euroshare.eu - closed #692 --- module/plugins/hoster/EuroshareEu.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py index 97e6a989a..5224dfd9f 100644 --- a/module/plugins/hoster/EuroshareEu.py +++ b/module/plugins/hoster/EuroshareEu.py @@ -23,40 +23,40 @@ class EuroshareEu(SimpleHoster): __name__ = "EuroshareEu" __type__ = "hoster" __pattern__ = r"http://(\w*\.)?euroshare.(eu|sk|cz|hu|pl)/file/.*" - __version__ = "0.24" + __version__ = "0.25" __description__ = """Euroshare.eu""" __author_name__ = ("zoidberg") FILE_INFO_PATTERN = r'(?P.+?) \((?P.+?)\)' FILE_OFFLINE_PATTERN = ur'

S.bor sa nena.iel

|Požadovaná stránka neexistuje!' - + FREE_URL_PATTERN = r'
Prebieha s.ahovanie|

Naraz je z jednej IP adresy mo.n. s.ahova. iba jeden s.bor' ERR_NOT_LOGGED_IN_PATTERN = r'href="/customer-zone/login/"' - + FILE_URL_REPLACEMENTS = [(r"(http://[^/]*\.)(sk|cz|hu|pl)/", r"\1eu/")] - + def setup(self): self.multiDL = self.resumeDownload = self.premium self.req.setOption("timeout", 120) - + def handlePremium(self): if self.ERR_NOT_LOGGED_IN_PATTERN in self.html: - self.account.relogin(user) - self.retry() + self.account.relogin(self.user) + self.retry(reason="User not logged in") self.download(self.pyfile.url.rstrip('/') + "/download/") - + check = self.checkDownload({"login": re.compile(self.ERR_NOT_LOGGED_IN_PATTERN), "json": re.compile(r'\{"status":"error".*?"message":"(.*?)"') }) if check == "login" or (check == "json" and self.lastCheck.group(1) == "Access token expired"): - self.account.relogin(user) - self.retry() + self.account.relogin(self.user) + self.retry(reason="Access token expired") elif check == "json": self.fail(self.lastCheck.group(1)) - def handleFree(self): + def handleFree(self): if re.search(self.ERR_PARDL_PATTERN, self.html) is not None: self.longWait(300, 12) @@ -66,9 +66,9 @@ class EuroshareEu(SimpleHoster): parsed_url = "http://euroshare.eu%s" % found.group(1) self.logDebug("URL", parsed_url) self.download(parsed_url, disposition=True) - + check = self.checkDownload({"multi_dl": re.compile(self.ERR_PARDL_PATTERN)}) if check == "multi_dl": self.longWait(300, 12) - -getInfo = create_getInfo(EuroshareEu) \ No newline at end of file + +getInfo = create_getInfo(EuroshareEu) \ No newline at end of file -- cgit v1.2.3 From 922d396ae0593b6b0203eaee342217e890ba12e0 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Fri, 9 Nov 2012 00:22:05 +0100 Subject: share76.com plugin by R2D2 C3PO - closed #710 --- module/plugins/accounts/Share76Com.py | 11 +++++++++++ module/plugins/hoster/Share76Com.py | 19 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 module/plugins/accounts/Share76Com.py create mode 100644 module/plugins/hoster/Share76Com.py (limited to 'module/plugins') diff --git a/module/plugins/accounts/Share76Com.py b/module/plugins/accounts/Share76Com.py new file mode 100644 index 000000000..9c946ae50 --- /dev/null +++ b/module/plugins/accounts/Share76Com.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +from module.plugins.internal.XFSPAccount import XFSPAccount + +class Share76Com(XFSPAccount): + __name__ = "Share76Com" + __version__ = "0.02" + __type__ = "account" + __description__ = """Share76.com account plugin""" + __author_name__ = ("me") + + MAIN_PAGE = "http://Share76.com/" diff --git a/module/plugins/hoster/Share76Com.py b/module/plugins/hoster/Share76Com.py new file mode 100644 index 000000000..db850cb73 --- /dev/null +++ b/module/plugins/hoster/Share76Com.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo + +class Share76Com(XFileSharingPro): + __name__ = "Share76Com" + __type__ = "hoster" + __pattern__ = r"http://(?:\w*\.)*?share76.com/\w{12}" + __version__ = "0.03" + __description__ = """share76.com hoster plugin""" + __author_name__ = ("me") + + FILE_INFO_PATTERN = r'

\s*File:\s*]*>(?P[^>]+)\s*\[]*>(?P[0-9.]+) (?P[kKMG])i?B\]

' + HOSTER_NAME = "share76.com" + + def setup(self): + self.resumeDownload = self.multiDL = self.premium + self.chunkLimit = 1 + +getInfo = create_getInfo(Share76Com) -- cgit v1.2.3 From 7e1d66ad5fdc3908e20d532d98ac819dd3437fe1 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Fri, 9 Nov 2012 23:14:33 +0100 Subject: update XFileSharingPro & add billionuploads,sendmyway,sharebees plugins --- module/plugins/hoster/BillionuploadsCom.py | 17 ++++ module/plugins/hoster/SendmywayCom.py | 18 ++++ module/plugins/hoster/SharebeesCom.py | 19 ++++ module/plugins/hoster/XFileSharingPro.py | 139 ++++++++++++++++------------- 4 files changed, 132 insertions(+), 61 deletions(-) create mode 100644 module/plugins/hoster/BillionuploadsCom.py create mode 100644 module/plugins/hoster/SendmywayCom.py create mode 100644 module/plugins/hoster/SharebeesCom.py (limited to 'module/plugins') diff --git a/module/plugins/hoster/BillionuploadsCom.py b/module/plugins/hoster/BillionuploadsCom.py new file mode 100644 index 000000000..5b053d547 --- /dev/null +++ b/module/plugins/hoster/BillionuploadsCom.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo + +class BillionuploadsCom(XFileSharingPro): + __name__ = "BillionuploadsCom" + __type__ = "hoster" + __pattern__ = r"http://(?:\w*\.)*?billionuploads.com/\w{12}" + __version__ = "0.01" + __description__ = """billionuploads.com hoster plugin""" + __author_name__ = ("zoidberg") + __author_mail__ = ("zoidberg@mujmail.cz") + + FILE_NAME_PATTERN = r'Filename:(?P.*?)
' + FILE_SIZE_PATTERN = r'Size:(?P.*?)
' + HOSTER_NAME = "billionuploads.com" + +getInfo = create_getInfo(BillionuploadsCom) diff --git a/module/plugins/hoster/SendmywayCom.py b/module/plugins/hoster/SendmywayCom.py new file mode 100644 index 000000000..fcbac850a --- /dev/null +++ b/module/plugins/hoster/SendmywayCom.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo + + +class SendmywayCom(XFileSharingPro): + __name__ = "SendmywayCom" + __type__ = "hoster" + __pattern__ = r"http://(?:\w*\.)*?sendmyway.com/\w{12}" + __version__ = "0.01" + __description__ = """SendMyWay hoster plugin""" + __author_name__ = ("zoidberg") + __author_mail__ = ("zoidberg@mujmail.cz") + + FILE_NAME_PATTERN = r'

<.*?>\s*(?P.+)' + FILE_SIZE_PATTERN = r'\((?P\d+) bytes\)' + HOSTER_NAME = "sendmyway.com" + +getInfo = create_getInfo(SendmywayCom) diff --git a/module/plugins/hoster/SharebeesCom.py b/module/plugins/hoster/SharebeesCom.py new file mode 100644 index 000000000..f5bacc5b0 --- /dev/null +++ b/module/plugins/hoster/SharebeesCom.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo + + +class SharebeesCom(XFileSharingPro): + __name__ = "SharebeesCom" + __type__ = "hoster" + __pattern__ = r"http://(?:\w*\.)*?sharebees.com/\w{12}" + __version__ = "0.01" + __description__ = """ShareBees hoster plugin""" + __author_name__ = ("zoidberg") + __author_mail__ = ("zoidberg@mujmail.cz") + + FILE_NAME_PATTERN = r'

<.*?>\s*(?P.+)' + FILE_SIZE_PATTERN = r'\((?P\d+) bytes\)' + FORM_PATTERN = 'F1' + HOSTER_NAME = "sharebees.com" + +getInfo = create_getInfo(SharebeesCom) diff --git a/module/plugins/hoster/XFileSharingPro.py b/module/plugins/hoster/XFileSharingPro.py index 713198754..d58a7073e 100644 --- a/module/plugins/hoster/XFileSharingPro.py +++ b/module/plugins/hoster/XFileSharingPro.py @@ -3,7 +3,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. + or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -34,7 +34,7 @@ class XFileSharingPro(SimpleHoster): __name__ = "XFileSharingPro" __type__ = "hoster" __pattern__ = r"^unmatchable$" - __version__ = "0.13" + __version__ = "0.14" __description__ = """XFileSharingPro common hoster base""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") @@ -52,21 +52,18 @@ class XFileSharingPro(SimpleHoster): RECAPTCHA_URL_PATTERN = r'http://[^"\']+?recaptcha[^"\']+?\?k=([^"\']+)"' CAPTCHA_DIV_PATTERN = r'Enter code.*?(.*?)

' ERROR_PATTERN = r'class=["\']err["\'][^>]*>(.*?)(\d)', html_unescape(captcha_div)) inputs['code'] = "".join([a[1] for a in sorted(numerals, key = lambda num: int(num[0]))]) - self.logDebug("CAPTCHA", inputs['code'], numerals) - return 3 + self.logDebug("CAPTCHA", inputs['code'], numerals) + return 3 return 0 - + getInfo = create_getInfo(XFileSharingPro) \ No newline at end of file -- cgit v1.2.3 From 94966b3c2a093a79858dd9672ae2380bdc3ccf6e Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Tue, 13 Nov 2012 21:57:57 +0100 Subject: youtube config options, resume - closed #717, ul.to - closed #716, netload.in - fix some urls, linkdecrypter - fix crypter list --- module/plugins/hooks/LinkdecrypterCom.py | 19 ++++++++++++------- module/plugins/hoster/NetloadIn.py | 12 ++++++++---- module/plugins/hoster/UploadedTo.py | 13 ++++++++----- module/plugins/hoster/YoutubeCom.py | 20 +++++++++++++++----- 4 files changed, 43 insertions(+), 21 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/hooks/LinkdecrypterCom.py b/module/plugins/hooks/LinkdecrypterCom.py index ac939afd9..a554e05eb 100644 --- a/module/plugins/hooks/LinkdecrypterCom.py +++ b/module/plugins/hooks/LinkdecrypterCom.py @@ -24,28 +24,33 @@ from module.utils import remove_chars class LinkdecrypterCom(Hook): __name__ = "LinkdecrypterCom" - __version__ = "0.14" + __version__ = "0.15" __description__ = """linkdecrypter.com - regexp loader""" __config__ = [ ("activated", "bool", "Activated" , "True") ] __author_name__ = ("zoidberg") - + def coreReady(self): page = getURL("http://linkdecrypter.com/") m = re.search(r'Supported: ([^+<]*)', page) if not m: self.logError(_("Crypter list not found")) return - - online = m.group(1).split(', ') + builtin = [ name.lower() for name in self.core.pluginManager.crypterPlugins.keys() ] builtin.extend([ "downloadserienjunkiesorg" ]) - - online = [ crypter.replace(".", "\\.") for crypter in online if remove_chars(crypter, "-.") not in builtin ] + + crypter_pattern = re.compile("(\w[\w.-]+)") + online = [] + for crypter in m.group(1).split(', '): + m = re.match(crypter_pattern, crypter) + if m and remove_chars(m.group(1), "-.") not in builtin: + online.append(m.group(1).replace(".", "\\.")) + if not online: self.logError(_("Crypter list is empty")) return - regexp = r"https?://([^.]+\.)*?(%s)/.*" % "|".join(online) + regexp = r"http://([^.]+\.)*?(%s)/.*" % "|".join(online) dict = self.core.pluginManager.crypterPlugins[self.__name__] dict["pattern"] = regexp diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py index fa2f3ddef..d2bf37d70 100644 --- a/module/plugins/hoster/NetloadIn.py +++ b/module/plugins/hoster/NetloadIn.py @@ -55,7 +55,7 @@ class NetloadIn(Hoster): __name__ = "NetloadIn" __type__ = "hoster" __pattern__ = r"http://.*netload\.in/(?:datei(.*?)(?:\.htm|/)|index.php?id=10&file_id=)" - __version__ = "0.40" + __version__ = "0.41" __description__ = """Netload.in Download Hoster""" __author_name__ = ("spoob", "RaNaN", "Gregy") __author_mail__ = ("spoob@pyload.org", "ranan@pyload.org", "gregy@gregy.cz") @@ -66,7 +66,7 @@ class NetloadIn(Hoster): self.multiDL = True self.chunkLimit = -1 self.resumeDownload = True - + def process(self, pyfile): self.url = pyfile.url self.prepare() @@ -94,7 +94,11 @@ class NetloadIn(Hoster): id_regex = re.compile(self.__pattern__) match = id_regex.search(url) - if not match: + if match: + #normalize url + self.url = 'http://www.netload.in/datei%s.htm' % match.group(1) + self.logDebug("URL: %s" % self.url) + else: self.api_data = False return @@ -107,7 +111,7 @@ class NetloadIn(Hoster): self.log.debug("Netload: APIDATA: "+src) self.api_data = {} - if src and src not in ("unknown file_data", "unknown_server_data", "No input file specified."): + if src and ";" in src and src not in ("unknown file_data", "unknown_server_data", "No input file specified."): lines = src.split(";") self.api_data["exists"] = True self.api_data["fileid"] = lines[0] diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index 19ca4ba9d..d729e73c6 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -74,13 +74,14 @@ class UploadedTo(Hoster): __name__ = "UploadedTo" __type__ = "hoster" __pattern__ = r"http://[\w\.-]*?(uploaded\.(to|net)(/file/|/?\?id=|.*?&id=)|ul\.to/)\w+" - __version__ = "0.62" + __version__ = "0.63" __description__ = """Uploaded.net Download Hoster""" __author_name__ = ("spoob", "mkaay", "zoidberg", "netpok") __author_mail__ = ("spoob@pyload.org", "mkaay@mkaay.de", "zoidberg@mujmail.cz", "netpok@gmail.com") FILE_INFO_PATTERN = r'
(?P[^<]+)  \s*]*>(?P[^<]+)' FILE_OFFLINE_PATTERN = r'Error: 404' + DL_LIMIT_PATTERN = "You have reached the max. number of possible free downloads for this hour" def setup(self): self.html = None @@ -199,7 +200,7 @@ class UploadedTo(Hoster): self.retry() elif "limit-parallel" in result: self.fail("Cannot download in parallel") - elif "You have reached the max. number of possible free downloads for this hour" in result: # limit-dl + elif self.DL_LIMIT_PATTERN in result: # limit-dl self.setWait(60 * 60, True) self.wait() self.retry() @@ -212,11 +213,13 @@ class UploadedTo(Hoster): break else: self.fail("Unknown error '%s'") - self.setWait(60 * 60, True) - self.wait() - self.retry() if not downloadURL: self.fail("No Download url retrieved/all captcha attempts failed") self.download(downloadURL) + check = self.checkDownload({"limit-dl": self.DL_LIMIT_PATTERN}) + if check == "limit-dl": + self.setWait(60 * 60, True) + self.wait() + self.retry() diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py index c9e8a1c7a..29cb3f60a 100644 --- a/module/plugins/hoster/YoutubeCom.py +++ b/module/plugins/hoster/YoutubeCom.py @@ -11,9 +11,9 @@ class YoutubeCom(Hoster): __name__ = "YoutubeCom" __type__ = "hoster" __pattern__ = r"(http|https)://(www\.)?(de\.)?\youtube\.com/watch\?v=.*" - __version__ = "0.27" - __config__ = [("quality", "sd;hd;fullhd", "Quality Setting", "hd"), - ("fmt", "int", "FMT Number 0-102", 0), + __version__ = "0.28" + __config__ = [("quality", "sd;hd;fullhd;240p;360p;480p;720p;1080p;3072p", "Quality Setting", "hd"), + ("fmt", "int", "FMT/ITAG Number (5-102, 0 for auto)", 0), (".mp4", "bool", "Allow .mp4", True), (".flv", "bool", "Allow .flv", True), (".webm", "bool", "Allow .webm", False), @@ -47,6 +47,8 @@ class YoutubeCom(Hoster): 102: (".webm", 1280, 720, 8, True) } + def setup(self): + self.resumeDownload = self.multiDL = True def process(self, pyfile): html = self.load(pyfile.url, decode=True) @@ -59,8 +61,16 @@ class YoutubeCom(Hoster): #get config use3d = self.getConf("3d") - quality = {"sd":82,"hd":84,"fullhd":85} if use3d else {"sd":18,"hd":22,"fullhd":37} - desired_fmt = self.getConf("fmt") or quality.get(self.getConf("quality"), 18) + if use3d: + quality = {"sd":82,"hd":84,"fullhd":85,"240p":83,"360p":82,"480p":82,"720p":84,"1080p":85,"3072p":85} + else: + quality = {"sd":18,"hd":22,"fullhd":37,"240p":5,"360p":18,"480p":35,"720p":22,"1080p":37,"3072p":38} + desired_fmt = self.getConf("fmt") + if desired_fmt and desired_fmt not in formats: + self.logWarning("FMT %d unknown - using default." % desired_fmt) + desired_fmt = 0 + if not desired_fmt: + desired_fmt = quality.get(self.getConf("quality"), 18) #parse available streams streams = unquote(re.search(r'url_encoded_fmt_stream_map=(.*?);', html).group(1)) -- cgit v1.2.3