From bfb0134f75b1faed65de0d415c57bc296c7a37d7 Mon Sep 17 00:00:00 2001 From: Stefano Date: Tue, 24 Jun 2014 16:48:20 +0200 Subject: [YouTube] Support shortened "youtu.be" links. + Improved bad chars sanitation in filename. See #656 --- module/plugins/hoster/YoutubeCom.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py index 330aae190..6505eac1a 100644 --- a/module/plugins/hoster/YoutubeCom.py +++ b/module/plugins/hoster/YoutubeCom.py @@ -7,6 +7,7 @@ from urllib import unquote from module.utils import html_unescape from module.plugins.Hoster import Hoster +from module.plugins.internal.SimpleHoster import replace_patterns def which(program): @@ -34,8 +35,8 @@ def which(program): class YoutubeCom(Hoster): __name__ = "YoutubeCom" __type__ = "hoster" - __pattern__ = r'https?://(?:[^/]*\.)?youtube\.com/watch.*?[?&]v=.*' - __version__ = "0.39" + __pattern__ = r'https?://(?:[^/]*\.)?(?:youtube\.com|youtu\.be)/watch.*?[?&]v=.*' + __version__ = "0.40" __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), @@ -47,6 +48,11 @@ class YoutubeCom(Hoster): __author_name__ = ("spoob", "zoidberg") __author_mail__ = ("spoob@pyload.org", "zoidberg@mujmail.cz") + FILE_URL_REPLACEMENTS = [(r'youtu\.be/', 'youtube.com/')] + + # Invalid characters that must be removed from the file name + invalidChars = u'\u2605:?><"|\\' + # name, width, height, quality ranking, 3D formats = {5: (".flv", 400, 240, 1, False), 6: (".flv", 640, 400, 4, False), @@ -74,6 +80,7 @@ class YoutubeCom(Hoster): self.resumeDownload = self.multiDL = True def process(self, pyfile): + pyfile.url = replace_patterns(pyfile.url, self.FILE_URL_REPLACEMENTS) html = self.load(pyfile.url, decode=True) if re.search(r'
', html): @@ -138,6 +145,8 @@ class YoutubeCom(Hoster): # Cleaning invalid characters from the file name name = name.encode('ascii', 'replace') + for c in self.invalidChars: + name = name.replace(c, '_') pyfile.name = html_unescape(name) -- cgit v1.2.3 From a6684ce241093935d3812b16da0094aab915d85d Mon Sep 17 00:00:00 2001 From: Samir Boulema Date: Wed, 25 Jun 2014 16:28:24 +0200 Subject: [Filefactory] Improved free links detect Merges #638 --- module/plugins/hoster/FilefactoryCom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index 273a717b5..21b803649 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -23,7 +23,7 @@ class FilefactoryCom(SimpleHoster): __name__ = "FilefactoryCom" __type__ = "hoster" __pattern__ = r'https?://(?:www\.)?filefactory\.com/file/(?P[a-zA-Z0-9]+)' - __version__ = "0.47" + __version__ = "0.48" __description__ = """Filefactory.com hoster plugin""" __author_name__ = "stickell" __author_mail__ = "l.stickell@yahoo.it" @@ -40,7 +40,7 @@ class FilefactoryCom(SimpleHoster): elif "All free download slots on this server are currently in use" in self.html: self.retry(50, 15 * 60, "All free slots are busy") - m = re.search(r'data-href-direct="(http://[^"]+)"', self.html) + m = re.search(r'data-href(?:-direct)?="(http://[^"]+)"', self.html) if m: t = re.search(r'
', self.html) if t: @@ -65,7 +65,7 @@ class FilefactoryCom(SimpleHoster): self.wait(int(waittime.group(1))) # Parse the direct link and download it - direct = re.search(r'data-href-direct="(.*)" class="button', self.html) + direct = re.search(r'data-href(?:-direct)?="(.*)" class="button', self.html) if not direct: self.parseError('Unable to detect free direct link') direct = direct.group(1) -- cgit v1.2.3 From 7d78210720ed3bde25ca240f8bd061cc6210e3fb Mon Sep 17 00:00:00 2001 From: Stefano Date: Thu, 26 Jun 2014 22:02:55 +0200 Subject: [SimplyPremium] Fix #649 --- module/plugins/hoster/SimplyPremiumCom.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py index c9fbf2ff1..17060e00d 100644 --- a/module/plugins/hoster/SimplyPremiumCom.py +++ b/module/plugins/hoster/SimplyPremiumCom.py @@ -34,12 +34,12 @@ def secondsToMidnight(): class SimplyPremiumCom(Hoster): __name__ = "SimplyPremiumCom" - __version__ = "0.01" + __version__ = "0.02" __type__ = "hoster" __pattern__ = r"https?://.*(simply-premium)\.com" __description__ = """Simply-Premium.Com hoster plugin""" - __author_name__ = ("EvolutionClip") - __author_mail__ = ("evolutionclip@live.de") + __author_name__ = "EvolutionClip" + __author_mail__ = "evolutionclip@live.de" def setup(self): self.chunkLimit = 16 @@ -82,20 +82,19 @@ class SimplyPremiumCom(Hoster): #self.api_data = page[new_url] try: - start = page.index('') + len('') - end = page.index('', start) - self.pyfile.name = page[start:end] - except ValueError: + self.pyfile.name = re.search(r'([^<]+)', page).group(1) + except AttributeError: self.pyfile.name = "" try: - start = page.index('') + len('') - end = page.index('', start) - self.pyfile.size = int(float(page[start:end])) - except ValueError: + self.pyfile.size = re.search(r'(\d+)', page).group(1) + except AttributeError: self.pyfile.size = 0 - new_url = 'http://www.simply-premium.com/premium.php?link=' + pyfile.url + try: + new_url = re.search(r'([^<]+)', page).group(1) + except AttributeError: + new_url = 'http://www.simply-premium.com/premium.php?link=' + pyfile.url if new_url != pyfile.url: self.logDebug("New URL: " + new_url) -- cgit v1.2.3 From 2945a72664d4b6e8ca6b50fa8efde483edfb9723 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 27 Jun 2014 00:59:12 +0200 Subject: Spare fixes --- module/plugins/hoster/MegacrypterCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/MegacrypterCom.py b/module/plugins/hoster/MegacrypterCom.py index 8b72606ce..ee6be39a2 100644 --- a/module/plugins/hoster/MegacrypterCom.py +++ b/module/plugins/hoster/MegacrypterCom.py @@ -36,7 +36,7 @@ class MegacrypterCom(MegaNz): dl = self.callApi(link=node, m="dl") # TODO: map error codes, implement password protection - # if info["pass"] == true: + # if info["pass"] == True: # crypted_file_key, md5_file_key = info["key"].split("#") key = self.b64_decode(info["key"]) -- cgit v1.2.3 From 10ce4afb555375e2cf101c8e89b53f398ba67c8c Mon Sep 17 00:00:00 2001 From: igel-kun Date: Sun, 29 Jun 2014 21:30:29 +0200 Subject: Update FilepostCom.py --- module/plugins/hoster/FilepostCom.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/FilepostCom.py b/module/plugins/hoster/FilepostCom.py index 01ac76850..d173a0df4 100644 --- a/module/plugins/hoster/FilepostCom.py +++ b/module/plugins/hoster/FilepostCom.py @@ -34,7 +34,7 @@ class FilepostCom(SimpleHoster): __name__ = "FilepostCom" __type__ = "hoster" __pattern__ = r'https?://(?:www\.)?(?:filepost\.com/files|fp.io)/([^/]+).*' - __version__ = "0.27" + __version__ = "0.28" __description__ = """Filepost.com hoster plugin""" __author_name__ = "zoidberg" __author_mail__ = "zoidberg@mujmail.cz" @@ -44,6 +44,7 @@ class FilepostCom(SimpleHoster): 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: '([^']+)'" + PREMIUM_ONLY_PATTERN = r'members only. Please upgrade to premium|a premium membership is required to download this file' def handleFree(self): # Find token and captcha key -- cgit v1.2.3 From c0a976b02b13fcda9d20372b4562a1fdfae61f82 Mon Sep 17 00:00:00 2001 From: Stefano Date: Mon, 30 Jun 2014 13:06:54 +0200 Subject: [Bitshare] Fixed #663 --- module/plugins/hoster/BitshareCom.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/BitshareCom.py b/module/plugins/hoster/BitshareCom.py index d4b0668c0..c1a0d50f8 100644 --- a/module/plugins/hoster/BitshareCom.py +++ b/module/plugins/hoster/BitshareCom.py @@ -12,7 +12,7 @@ class BitshareCom(SimpleHoster): __name__ = "BitshareCom" __type__ = "hoster" __pattern__ = r'http://(?:www\.)?bitshare\.com/(files/(?P[a-zA-Z0-9]+)(/(?P.*?)\.html)?|\?f=(?P[a-zA-Z0-9]+))' - __version__ = "0.49" + __version__ = "0.50" __description__ = """Bitshare.com hoster plugin""" __author_name__ = ("Paul King", "fragonib") __author_mail__ = ("", "fragonib[AT]yahoo[DOT]es") @@ -70,6 +70,12 @@ class BitshareCom(SimpleHoster): self.logDebug("Downloading file with url [%s]" % url) self.download(url) + check = self.checkDownload({"404": ">404 Not Found<", "Error": ">Error occured<"}) + if check == "404": + self.retry(3, 60, 'Error 404') + elif check == "error": + self.retry(5, 5 * 60, "Bitshare host : Error occured") + def getDownloadUrl(self): # Return location if direct download is active if self.premium: -- cgit v1.2.3 From b0ce3ead2971a37f400ac722372def09a726c375 Mon Sep 17 00:00:00 2001 From: igel-kun Date: Tue, 1 Jul 2014 20:52:22 +0200 Subject: [Uploaded] Fixes Merges #668 --- module/plugins/hoster/UploadedTo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index 6d17bcbd9..99db802cf 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -89,7 +89,7 @@ class UploadedTo(Hoster): __name__ = "UploadedTo" __type__ = "hoster" __pattern__ = r'https?://(?:www\.)?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P\w+)' - __version__ = "0.72" + __version__ = "0.73" __description__ = """Uploaded.net hoster plugin""" __author_name__ = ("spoob", "mkaay", "zoidberg", "netpok", "stickell") __author_mail__ = ("spoob@pyload.org", "mkaay@mkaay.de", "zoidberg@mujmail.cz", @@ -210,7 +210,7 @@ class UploadedTo(Hoster): self.setWait(3 * 60 * 60, True) self.wait() self.retry() - elif 'err:"captcha"' in result: + elif '"err":"captcha"' in result: self.logError("ul.net captcha is disabled") self.invalidCaptcha() elif "type:'download'" in result: @@ -218,7 +218,7 @@ class UploadedTo(Hoster): downloadURL = re.search("url:'([^']+)", result).group(1) break else: - self.fail("Unknown error '%s'") + self.fail("Unknown error '%s'" % result) if not downloadURL: self.fail("No Download url retrieved/all captcha attempts failed") -- cgit v1.2.3 From 47d3ef52a10e1a0db8b73fde81c9d3a7eaed00c3 Mon Sep 17 00:00:00 2001 From: Stefano Date: Wed, 2 Jul 2014 14:56:10 +0200 Subject: [Filefactory] getInfo handle direct links Partially fixes #648 --- module/plugins/hoster/FilefactoryCom.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index 21b803649..05edf6b99 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -16,14 +16,26 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo +from module.network.RequestFactory import getURL + + +def getInfo(urls): + for url in urls: + h = getURL(url, just_header=True) + m = re.search(r'Location: (.+)\r\n', h) + if m and not re.match(m.group(1), FilefactoryCom.__pattern__): # It's a direct link! Skipping + yield (url, 0, 3, url) + else: # It's a standard html page + file_info = parseFileInfo(FilefactoryCom, url, getURL(url)) + yield file_info class FilefactoryCom(SimpleHoster): __name__ = "FilefactoryCom" __type__ = "hoster" __pattern__ = r'https?://(?:www\.)?filefactory\.com/file/(?P[a-zA-Z0-9]+)' - __version__ = "0.48" + __version__ = "0.49" __description__ = """Filefactory.com hoster plugin""" __author_name__ = "stickell" __author_mail__ = "l.stickell@yahoo.it" @@ -101,6 +113,3 @@ class FilefactoryCom(SimpleHoster): self.logDebug('DIRECT PREMIUM LINK: ' + url) self.download(url, disposition=True) - - -getInfo = create_getInfo(FilefactoryCom) -- cgit v1.2.3 From 521a8122e24cbcf27578e88d75fea356b4ea4a5f Mon Sep 17 00:00:00 2001 From: Stefano Date: Wed, 2 Jul 2014 15:17:50 +0200 Subject: [Filefactory] Improved offline pattern Forced english locale --- module/plugins/hoster/FilefactoryCom.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index 05edf6b99..ab0d3232f 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -35,15 +35,16 @@ class FilefactoryCom(SimpleHoster): __name__ = "FilefactoryCom" __type__ = "hoster" __pattern__ = r'https?://(?:www\.)?filefactory\.com/file/(?P[a-zA-Z0-9]+)' - __version__ = "0.49" + __version__ = "0.50" __description__ = """Filefactory.com hoster plugin""" __author_name__ = "stickell" __author_mail__ = "l.stickell@yahoo.it" FILE_INFO_PATTERN = r'
]*>\s*

(?P[^<]+)

\s*
\s*(?P[\d.]+) (?P\w+) uploaded' DIRECT_LINK_PATTERN = r']*>]*> Download with FileFactory Premium' - FILE_OFFLINE_PATTERN = r'

File Removed

' + FILE_OFFLINE_PATTERN = r'

File Removed

|This file is no longer available' PREMIUM_ONLY_PATTERN = r'>Premium Account Required<' + SH_COOKIES = [('.filefactory.com', 'locale', 'en_US.utf8')] def handleFree(self): self.html = self.load(self.pyfile.url, decode=True) -- cgit v1.2.3 From 389e5bd208feb97f4faca9cfd4bc0f037efc32d9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 5 Jul 2014 16:31:44 +0200 Subject: [VeohCom] Auto quality detection --- module/plugins/hoster/VeohCom.py | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/VeohCom.py b/module/plugins/hoster/VeohCom.py index c1ebffb81..15d7a98b0 100644 --- a/module/plugins/hoster/VeohCom.py +++ b/module/plugins/hoster/VeohCom.py @@ -23,8 +23,8 @@ class VeohCom(SimpleHoster): __name__ = "VeohCom" __type__ = "hoster" __pattern__ = r'http://(?:www\.)?veoh\.com/(tv/)?(watch|videos)/(?Pv\w+)' - __version__ = "0.1" - __config__ = [("quality", "Low;High", "Quality", "High")] + __version__ = "0.2" + __config__ = [("quality", "Low;High;Auto", "Quality", "Auto")] __description__ = """Veoh.com hoster plugin""" __author_name__ = "Walter Purcaro" __author_mail__ = "vuolter@gmail.com" @@ -41,16 +41,22 @@ class VeohCom(SimpleHoster): self.chunkLimit = -1 def handleFree(self): - q = self.getConfig("quality") - pattern = r'"fullPreviewHash%sPath":"(.+?)"' % q - found = re.search(pattern, self.html) - if found: - self.pyfile.name += ".mp4" - link = found.group(1).replace("\\", "") - self.logDebug("Download link: " + link) - self.download(link) + quality = self.getConfig("quality") + if quality == "Auto": + quality = ("High", "Low") + for q in quality: + pattern = r'"fullPreviewHash%sPath":"(.+?)"' % q + found = re.search(pattern, self.html) + if found: + self.pyfile.name += ".mp4" + link = found.group(1).replace("\\", "") + self.logDebug("Download link: " + link) + self.download(link) + return + else: + self.logInfo("No %s quality video found" % q.upper()) else: - self.fail("No %s quality video found" % q.lower()) + self.fail("No video found!") getInfo = create_getInfo(VeohCom) -- cgit v1.2.3 From d016326ea5611c5dd9c0d5fcf2145fc202a45a9a Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 5 Jul 2014 16:33:12 +0200 Subject: New hoster: VimeoCom --- module/plugins/hoster/VimeoCom.py | 82 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 module/plugins/hoster/VimeoCom.py (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/VimeoCom.py b/module/plugins/hoster/VimeoCom.py new file mode 100644 index 000000000..3d93d3d03 --- /dev/null +++ b/module/plugins/hoster/VimeoCom.py @@ -0,0 +1,82 @@ +# -*- coding: utf-8 -*- +############################################################################ +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, 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 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +############################################################################ + +import re + +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class VimeoCom(SimpleHoster): + __name__ = "VimeoCom" + __type__ = "hoster" + __pattern__ = r'https?://(?:www\.)?(player\.)?vimeo\.com/(video/)?(?P\d+)' + __version__ = "0.01" + __config__ = [("quality", "Lowest;Mobile;SD;HD;Highest", "Quality", "Highest"), + ("original", "bool", "Try to download the original file first", True)] + __description__ = """Vimeo.com hoster plugin""" + __author_name__ = "Walter Purcaro" + __author_mail__ = "vuolter@gmail.com" + + FILE_NAME_PATTERN = r'(?P<N>.+) on Vimeo<' + FILE_OFFLINE_PATTERN = r'class="exception_header"' + TEMP_OFFLINE_PATTERN = r'Please try again in a few minutes.<' + + FILE_URL_REPLACEMENTS = [(__pattern__, r'https://www.vimeo.com/\g<ID>')] + + SH_COOKIES = [(".vimeo.com", "language", "en")] + + + def setup(self): + self.resumeDownload = self.multiDL = True + self.chunkLimit = -1 + + def handleFree(self): + if self.js and 'class="btn iconify_down_b"' in self.html: + html = self.js.eval(self.load(self.pyfile.url, get={'action': "download"}, decode=True)) + pattern = r'href="(?P<URL>http://vimeo\.com.+?)".*?\>(?P<QL>.+?) ' + else: + id = re.match(self.__pattern__, self.pyfile.url).group("ID") + html = self.load("https://player.vimeo.com/video/" + id) + pattern = r'"(?P<QL>\w+)":{"profile".*?"(?P<URL>http://pdl\.vimeocdn\.com.+?)"' + + link = dict([(l.group('QL').lower(), l.group('URL')) for l in re.finditer(pattern, html)]) + + if self.getConfig("original"): + if "original" in link: + self.download(link[q]) + return + else: + self.logInfo("Original file not downloadable") + + quality = self.getConfig("quality") + if quality == "Highest": + qlevel = ("hd", "sd", "mobile") + elif quality == "Lowest": + qlevel = ("mobile", "sd", "hd") + else: + qlevel = quality.lower() + + for q in qlevel: + if q in link: + self.download(link[q]) + return + else: + self.logInfo("No %s quality video found" % q.upper()) + else: + self.fail("No video found!") + + +getInfo = create_getInfo(VimeoCom) -- cgit v1.2.3 From 3ebfa9a6348983437712e9cea22504d38f633588 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Sat, 5 Jul 2014 16:34:09 +0200 Subject: [PutlockerCom] Renamed to FiredriveCom --- module/plugins/hoster/FiredriveCom.py | 51 +++++++++++++++++++++++++++++++++ module/plugins/hoster/PutlockerCom.py | 53 ----------------------------------- 2 files changed, 51 insertions(+), 53 deletions(-) create mode 100644 module/plugins/hoster/FiredriveCom.py delete mode 100644 module/plugins/hoster/PutlockerCom.py (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/FiredriveCom.py b/module/plugins/hoster/FiredriveCom.py new file mode 100644 index 000000000..9c150bc11 --- /dev/null +++ b/module/plugins/hoster/FiredriveCom.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +############################################################################### +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, 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 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +############################################################################### + +import re + +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class FiredriveCom(SimpleHoster): + __name__ = "FiredriveCom" + __type__ = "hoster" + __pattern__ = r'https?://(?:www\.)?(firedrive|putlocker)\.com/(mobile/)?(file|embed)/(?P<ID>\w+)' + __version__ = "0.01" + __description__ = """Firedrive.com hoster plugin""" + __author_name__ = "Walter Purcaro" + __author_mail__ = "vuolter@gmail.com" + + FILE_NAME_PATTERN = r'<b>Name:</b> (?P<N>.+) <br>' + FILE_SIZE_PATTERN = r'<b>Size:</b> (?P<S>[\d.]+) (?P<U>[a-zA-Z]+) <br>' + FILE_OFFLINE_PATTERN = r'class="sad_face_image"' + + FILE_URL_REPLACEMENTS = [(__pattern__, r'http://www.firedrive.com/file/\g<ID>')] + + def setup(self): + self.multiDL = self.resumeDownload = True + self.chunkLimit = -1 + + def handleFree(self): + link = self._getLink() + self.logDebug("Direct link: " + link) + self.download(link, disposition=True) + + def _getLink(self): + self.html = self.load(self.pyfile.url, post={"confirm": re.search(r'name="confirm" value="(.*)"', self.html).group(1)}) + return re.search(r'<a href="(https?://dl\.firedrive\.com/.*?)"', self.html).group(1) + + +getInfo = create_getInfo(FiredriveCom) diff --git a/module/plugins/hoster/PutlockerCom.py b/module/plugins/hoster/PutlockerCom.py deleted file mode 100644 index a453eaf62..000000000 --- a/module/plugins/hoster/PutlockerCom.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################### -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, 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 -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# @author: Walter Purcaro -############################################################################### - -import re - -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo - - -class PutlockerCom(SimpleHoster): - __name__ = "PutlockerCom" - __type__ = "hoster" - __pattern__ = r'https?://(?:www\.)?(firedrive|putlocker)\.com/(mobile/)?(file|embed)/(?P<ID>\w+)' - __version__ = "0.33" - __description__ = """Firedrive.com hoster plugin""" - __author_name__ = "Walter Purcaro" - __author_mail__ = "vuolter@gmail.com" - - FILE_NAME_PATTERN = r'<b>Name:</b> (?P<N>.+) <br>' - FILE_SIZE_PATTERN = r'<b>Size:</b> (?P<S>[\d.]+) (?P<U>[a-zA-Z]+) <br>' - FILE_OFFLINE_PATTERN = r"<div class=\"sad_face_image\">" - - FILE_URL_REPLACEMENTS = [(__pattern__, r'http://www.firedrive.com/file/\g<ID>')] - - def setup(self): - self.multiDL = self.resumeDownload = True - self.chunkLimit = -1 - - def handleFree(self): - link = self._getLink() - self.logDebug("Direct link: " + link) - self.download(link, disposition=True) - - def _getLink(self): - self.html = self.load(self.pyfile.url, post={"confirm": re.search(r'name="confirm" value="(.*)"', self.html).group(1)}) - return re.search(r'<a href="(https?://dl\.firedrive\.com/.*?)"', self.html).group(1) - - -getInfo = create_getInfo(PutlockerCom) -- cgit v1.2.3 From cc0a1b0fc0de0690e0b98cfd9416fb3a61f5ea05 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Sat, 5 Jul 2014 16:34:57 +0200 Subject: [DailymotionCom] Default quality changed to "Highest" --- module/plugins/hoster/DailymotionCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/DailymotionCom.py b/module/plugins/hoster/DailymotionCom.py index 17e1ecf92..c377a0635 100644 --- a/module/plugins/hoster/DailymotionCom.py +++ b/module/plugins/hoster/DailymotionCom.py @@ -60,7 +60,7 @@ class DailymotionCom(Hoster): __type__ = "hoster" __pattern__ = r'https?://(?:www\.)?dailymotion\.com/.*?video/(?P<ID>[\w^_]+)' __version__ = "0.2" - __config__ = [("quality", "Lowest;LD 144p;LD 240p;SD 384p;HQ 480p;HD 720p;HD 1080p;Highest", "Quality", "HD 720p")] + __config__ = [("quality", "Lowest;LD 144p;LD 240p;SD 384p;HQ 480p;HD 720p;HD 1080p;Highest", "Quality", "Highest")] __description__ = """Dailymotion.com hoster plugin""" __author_name__ = "Walter Purcaro" __author_mail__ = "vuolter@gmail.com" -- cgit v1.2.3 From 93592862b520a862c01f80c019e5c4bc43746c19 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Sat, 5 Jul 2014 16:54:20 +0200 Subject: [SimpleHoster] Better inline docs + changed "FILE_OFFLINE_PATTERN" to "OFFLINE_PATTERN" --- module/plugins/hoster/BayfilesCom.py | 2 +- module/plugins/hoster/BezvadataCz.py | 2 +- module/plugins/hoster/BitshareCom.py | 4 ++-- module/plugins/hoster/CatShareNet.py | 2 +- module/plugins/hoster/CrockoCom.py | 2 +- module/plugins/hoster/CzshareCom.py | 2 +- module/plugins/hoster/DataHu.py | 2 +- module/plugins/hoster/DataportCz.py | 2 +- module/plugins/hoster/DateiTo.py | 2 +- module/plugins/hoster/DepositfilesCom.py | 4 ++-- module/plugins/hoster/DlFreeFr.py | 2 +- module/plugins/hoster/EasybytezCom.py | 2 +- module/plugins/hoster/EdiskCz.py | 2 +- module/plugins/hoster/EgoFilesCom.py | 2 +- module/plugins/hoster/EpicShareNet.py | 2 +- module/plugins/hoster/EuroshareEu.py | 2 +- module/plugins/hoster/ExtabitCom.py | 2 +- module/plugins/hoster/FastshareCz.py | 2 +- module/plugins/hoster/FileStoreTo.py | 2 +- module/plugins/hoster/FilecloudIo.py | 2 +- module/plugins/hoster/FilefactoryCom.py | 2 +- module/plugins/hoster/FilepostCom.py | 2 +- module/plugins/hoster/FilerNet.py | 2 +- module/plugins/hoster/FilerioCom.py | 2 +- module/plugins/hoster/FiredriveCom.py | 2 +- module/plugins/hoster/FourSharedCom.py | 2 +- module/plugins/hoster/FreevideoCz.py | 6 +++--- module/plugins/hoster/FshareVn.py | 2 +- module/plugins/hoster/GigapetaCom.py | 2 +- module/plugins/hoster/GooIm.py | 2 +- module/plugins/hoster/HellshareCz.py | 2 +- module/plugins/hoster/IFileWs.py | 2 +- module/plugins/hoster/IfileIt.py | 2 +- module/plugins/hoster/IfolderRu.py | 2 +- module/plugins/hoster/JumbofilesCom.py | 2 +- module/plugins/hoster/Keep2shareCC.py | 2 +- module/plugins/hoster/LemUploadsCom.py | 2 +- module/plugins/hoster/LoadTo.py | 4 ++-- module/plugins/hoster/LuckyShareNet.py | 2 +- module/plugins/hoster/MediafireCom.py | 2 +- module/plugins/hoster/MegaFilesSe.py | 2 +- module/plugins/hoster/MegasharesCom.py | 2 +- module/plugins/hoster/MovReelCom.py | 2 +- module/plugins/hoster/MultishareCz.py | 2 +- module/plugins/hoster/NarodRu.py | 2 +- module/plugins/hoster/NowDownloadEu.py | 2 +- module/plugins/hoster/OneFichierCom.py | 2 +- module/plugins/hoster/PromptfileCom.py | 2 +- module/plugins/hoster/QuickshareCz.py | 2 +- module/plugins/hoster/RapidgatorNet.py | 2 +- module/plugins/hoster/RgHostNet.py | 2 +- module/plugins/hoster/SecureUploadEu.py | 2 +- module/plugins/hoster/SendspaceCom.py | 2 +- module/plugins/hoster/ShareRapidCom.py | 2 +- module/plugins/hoster/SockshareCom.py | 2 +- module/plugins/hoster/StreamCz.py | 6 +++--- module/plugins/hoster/TurbobitNet.py | 2 +- module/plugins/hoster/TusfilesNet.py | 2 +- module/plugins/hoster/TwoSharedCom.py | 2 +- module/plugins/hoster/UlozTo.py | 4 ++-- module/plugins/hoster/UloziskoSk.py | 2 +- module/plugins/hoster/UploadedTo.py | 4 ++-- module/plugins/hoster/UploadheroCom.py | 2 +- module/plugins/hoster/UploadingCom.py | 2 +- module/plugins/hoster/UpstoreNet.py | 2 +- module/plugins/hoster/UptoboxCom.py | 2 +- module/plugins/hoster/VeohCom.py | 2 +- module/plugins/hoster/VidPlayNet.py | 2 +- module/plugins/hoster/VimeoCom.py | 2 +- module/plugins/hoster/WarserverCz.py | 2 +- module/plugins/hoster/XFileSharingPro.py | 2 +- module/plugins/hoster/YibaishiwuCom.py | 2 +- module/plugins/hoster/ZippyshareCom.py | 2 +- 73 files changed, 82 insertions(+), 82 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/BayfilesCom.py b/module/plugins/hoster/BayfilesCom.py index b080eb386..720603c4d 100644 --- a/module/plugins/hoster/BayfilesCom.py +++ b/module/plugins/hoster/BayfilesCom.py @@ -34,7 +34,7 @@ class BayfilesCom(SimpleHoster): __author_mail__ = ("zoidberg@mujmail.cz", "vuolter@gmail.com") FILE_INFO_PATTERN = r'<p title="(?P<N>[^"]+)">[^<]*<strong>(?P<S>[0-9., ]+)(?P<U>[kKMG])i?B</strong></p>' - FILE_OFFLINE_PATTERN = r'(<p>The requested file could not be found.</p>|<title>404 Not Found)' + OFFLINE_PATTERN = r'(

The requested file could not be found.

|404 Not Found)' WAIT_PATTERN = r'>Your IP [0-9.]* has recently downloaded a file\. Upgrade to premium or wait (\d+) minutes\.<' VARS_PATTERN = r'var vfid = (\d+);\s*var delay = (\d+);' diff --git a/module/plugins/hoster/BezvadataCz.py b/module/plugins/hoster/BezvadataCz.py index 55f3f33b9..ca2ad5243 100644 --- a/module/plugins/hoster/BezvadataCz.py +++ b/module/plugins/hoster/BezvadataCz.py @@ -32,7 +32,7 @@ class BezvadataCz(SimpleHoster): FILE_NAME_PATTERN = r'

Soubor: (?P[^<]+)

' FILE_SIZE_PATTERN = r'
  • Velikost: (?P[^<]+)
  • ' - FILE_OFFLINE_PATTERN = r'BezvaData \| Soubor nenalezen' + OFFLINE_PATTERN = r'BezvaData \| Soubor nenalezen' def setup(self): self.multiDL = self.resumeDownload = True diff --git a/module/plugins/hoster/BitshareCom.py b/module/plugins/hoster/BitshareCom.py index c1a0d50f8..3b0fc5137 100644 --- a/module/plugins/hoster/BitshareCom.py +++ b/module/plugins/hoster/BitshareCom.py @@ -18,7 +18,7 @@ class BitshareCom(SimpleHoster): __author_mail__ = ("", "fragonib[AT]yahoo[DOT]es") HOSTER_DOMAIN = "bitshare.com" - FILE_OFFLINE_PATTERN = r'(>We are sorry, but the requested file was not found in our database|>Error - File not available<|The file was deleted either by the uploader, inactivity or due to copyright claim)' + OFFLINE_PATTERN = r'(>We are sorry, but the requested file was not found in our database|>Error - File not available<|The file was deleted either by the uploader, inactivity or due to copyright claim)' FILE_INFO_PATTERN = r'Downloading (?P.+) - (?P[\d.]+) (?P\w+)' FILE_AJAXID_PATTERN = r'var ajaxdl = "(.*?)";' CAPTCHA_KEY_PATTERN = r"http://api\.recaptcha\.net/challenge\?k=(.*?) " @@ -44,7 +44,7 @@ class BitshareCom(SimpleHoster): self.html = self.load(pyfile.url, ref=False, decode=True) # Check offline - if re.search(self.FILE_OFFLINE_PATTERN, self.html): + if re.search(self.OFFLINE_PATTERN, self.html): self.offline() # Check Traffic used up diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index efaf8e5f7..fa84b7732 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -15,7 +15,7 @@ class CatShareNet(SimpleHoster): __author_mail__ = "z00nx0@gmail.com" FILE_INFO_PATTERN = r'

    ]+>(?P.*)

    \s+

    ]+>(?P.*)

    ' - FILE_OFFLINE_PATTERN = r'Podany plik zosta' + OFFLINE_PATTERN = r'Podany plik zosta' SECONDS_PATTERN = 'var\s+count\s+=\s+(\d+);' RECAPTCHA_KEY = "6Lfln9kSAAAAANZ9JtHSOgxUPB9qfDFeLUI_QMEy" diff --git a/module/plugins/hoster/CrockoCom.py b/module/plugins/hoster/CrockoCom.py index 3cd2be59d..3d7360769 100644 --- a/module/plugins/hoster/CrockoCom.py +++ b/module/plugins/hoster/CrockoCom.py @@ -17,7 +17,7 @@ class CrockoCom(SimpleHoster): FILE_NAME_PATTERN = r'Download:\s*(?P.*)' FILE_SIZE_PATTERN = r'(?P[^<]+)' - FILE_OFFLINE_PATTERN = r"

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

    |File not found" + OFFLINE_PATTERN = r"

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

    |File not found" DOWNLOAD_URL_PATTERN = r"window.location ='([^']+)';" CAPTCHA_URL_PATTERN = re.compile(r"u='(/file_contents/captcha/\w+)';\s*w='(\d+)';") CAPTCHA_KEY_PATTERN = re.compile(r'Recaptcha.create\("([^"]+)"') diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py index a462deaff..5fab87157 100644 --- a/module/plugins/hoster/CzshareCom.py +++ b/module/plugins/hoster/CzshareCom.py @@ -36,7 +36,7 @@ class CzshareCom(SimpleHoster): FILE_NAME_PATTERN = r'
    \s*

    \s*Cel. n.zev: ]*>(?P[^<]+)' FILE_SIZE_PATTERN = r'

    (?:\s*

    [^\n]*

    )*\s*Velikost:\s*(?P[0-9., ]+)(?P[kKMG])i?B\s*
    ' - FILE_OFFLINE_PATTERN = r'
    \s*

    ' + OFFLINE_PATTERN = r'
    \s*

    ' FILE_SIZE_REPLACEMENTS = [(' ', '')] FILE_URL_REPLACEMENTS = [(r'http://[^/]*/download.php\?.*?id=(\w+).*', r'http://sdilej.cz/\1/x/')] diff --git a/module/plugins/hoster/DataHu.py b/module/plugins/hoster/DataHu.py index 0c872b419..74333d743 100644 --- a/module/plugins/hoster/DataHu.py +++ b/module/plugins/hoster/DataHu.py @@ -32,7 +32,7 @@ class DataHu(SimpleHoster): __author_mail__ = "l.stickell@yahoo.it" FILE_INFO_PATTERN = ur'(?P<N>.*) \((?P<S>[^)]+)\) let\xf6lt\xe9se' - FILE_OFFLINE_PATTERN = ur'Az adott f\xe1jl nem l\xe9tezik' + OFFLINE_PATTERN = ur'Az adott f\xe1jl nem l\xe9tezik' DIRECT_LINK_PATTERN = r'
    ' def handleFree(self): diff --git a/module/plugins/hoster/DataportCz.py b/module/plugins/hoster/DataportCz.py index 291dcaf55..a5ff05f39 100644 --- a/module/plugins/hoster/DataportCz.py +++ b/module/plugins/hoster/DataportCz.py @@ -31,7 +31,7 @@ class DataportCz(SimpleHoster): FILE_NAME_PATTERN = r'(?P[^<]+)' FILE_SIZE_PATTERN = r'Velikost\s*(?P[^<]+)' - FILE_OFFLINE_PATTERN = r'

    Soubor nebyl nalezen

    ' + OFFLINE_PATTERN = r'

    Soubor nebyl nalezen

    ' FILE_URL_REPLACEMENTS = [(__pattern__, r'http://www.dataport.cz/file/\1')] CAPTCHA_URL_PATTERN = r'
    \s*\s*(?P.*?)\s*(?P.*?)Datei wurde nicht gefunden<|>Bitte wähle deine Datei aus... <' + OFFLINE_PATTERN = r'>Datei wurde nicht gefunden<|>Bitte wähle deine Datei aus... <' PARALELL_PATTERN = r'>Du lädst bereits eine Datei herunter<' WAIT_PATTERN = r'countdown\({seconds: (\d+)' diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py index 11b4f4112..7b9713861 100644 --- a/module/plugins/hoster/DepositfilesCom.py +++ b/module/plugins/hoster/DepositfilesCom.py @@ -17,7 +17,7 @@ class DepositfilesCom(SimpleHoster): FILE_SIZE_PATTERN = r': (?P[0-9.]+) (?P[kKMG])i?B' FILE_NAME_PATTERN = r'' + OFFLINE_PATTERN = r'' def process(self, pyfile): self.html = self.load(pyfile.url, decode=True) diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py index b966fd1d6..11950318b 100644 --- a/module/plugins/hoster/RapidgatorNet.py +++ b/module/plugins/hoster/RapidgatorNet.py @@ -38,7 +38,7 @@ class RapidgatorNet(SimpleHoster): FILE_NAME_PATTERN = r'Download file (?P<N>.*)' FILE_SIZE_PATTERN = r'File size:\s*(?P[\d\.]+) (?P\w+)' - FILE_OFFLINE_PATTERN = r'>(File not found|Error 404)' + OFFLINE_PATTERN = r'>(File not found|Error 404)' JSVARS_PATTERN = r"\s+var\s*(startTimerUrl|getDownloadUrl|captchaUrl|fid|secs)\s*=\s*'?(.*?)'?;" PREMIUM_ONLY_ERROR_PATTERN = r'You can download files up to|This file can be downloaded by premium only<' diff --git a/module/plugins/hoster/RgHostNet.py b/module/plugins/hoster/RgHostNet.py index 9e37ed87b..4c6e040cb 100644 --- a/module/plugins/hoster/RgHostNet.py +++ b/module/plugins/hoster/RgHostNet.py @@ -14,7 +14,7 @@ class RgHostNet(SimpleHoster): __author_mail__ = "z00nx0@gmail.com" FILE_INFO_PATTERN = r'

    \s+(]+>)?(?P[^<]+)()?\s+]+>\s+\((?P[^)]+)\)\s+\s+

    ' - FILE_OFFLINE_PATTERN = r'File is deleted|this page is not found' + OFFLINE_PATTERN = r'File is deleted|this page is not found' DOWNLOAD_LINK_PATTERN = ''']+>Download''' def handleFree(self): diff --git a/module/plugins/hoster/SecureUploadEu.py b/module/plugins/hoster/SecureUploadEu.py index 1b11d691d..bf0b349e6 100644 --- a/module/plugins/hoster/SecureUploadEu.py +++ b/module/plugins/hoster/SecureUploadEu.py @@ -15,7 +15,7 @@ class SecureUploadEu(XFileSharingPro): HOSTER_NAME = "secureupload.eu" FILE_INFO_PATTERN = '

    Downloading (?P[^<]+) \((?P[^<]+)\)

    ' - FILE_OFFLINE_PATTERN = 'The file was removed|File Not Found' + OFFLINE_PATTERN = 'The file was removed|File Not Found' getInfo = create_getInfo(SecureUploadEu) diff --git a/module/plugins/hoster/SendspaceCom.py b/module/plugins/hoster/SendspaceCom.py index d6eafac0c..8b6c9781a 100644 --- a/module/plugins/hoster/SendspaceCom.py +++ b/module/plugins/hoster/SendspaceCom.py @@ -33,7 +33,7 @@ class SendspaceCom(SimpleHoster): DOWNLOAD_URL_PATTERN = r'\s*<(?:b|strong)>(?P[^<]+)\s*File Size:\s*(?P[0-9.]+)(?P[kKMG])i?B\s*
    ' - FILE_OFFLINE_PATTERN = r'
    Sorry, the file you requested is not available.
    ' + OFFLINE_PATTERN = r'
    Sorry, the file you requested is not available.
    ' CAPTCHA_PATTERN = r'' USER_CAPTCHA_PATTERN = r'' diff --git a/module/plugins/hoster/ShareRapidCom.py b/module/plugins/hoster/ShareRapidCom.py index b82a142ea..aca7e995b 100644 --- a/module/plugins/hoster/ShareRapidCom.py +++ b/module/plugins/hoster/ShareRapidCom.py @@ -30,7 +30,7 @@ class ShareRapidCom(SimpleHoster): FILE_NAME_PATTERN = r']*>]*>(?:]*>)?(?P[^<]+)' FILE_SIZE_PATTERN = r'Velikost:\s*\s*(?P[0-9.]+) (?P[kKMG])i?B' - FILE_OFFLINE_PATTERN = ur'Nastala chyba 404|Soubor byl smazán' + OFFLINE_PATTERN = ur'Nastala chyba 404|Soubor byl smazán' DOWNLOAD_URL_PATTERN = r'
    ([^<]+)' ERR_LOGIN_PATTERN = ur'
    Stahování je přístupné pouze přihlášeným uživatelům' diff --git a/module/plugins/hoster/SockshareCom.py b/module/plugins/hoster/SockshareCom.py index 017c8a839..60fd6a4cd 100644 --- a/module/plugins/hoster/SockshareCom.py +++ b/module/plugins/hoster/SockshareCom.py @@ -32,7 +32,7 @@ class SockshareCom(SimpleHoster): __author_mail__ = ("jeix@hasnomail.de", "l.stickell@yahoo.it", "vuolter@gmail.com") FILE_INFO_PATTERN = r'site-content">\s*

    (?P.+)\( (?P[^)]+) \)

    ' - FILE_OFFLINE_PATTERN = r'>This file doesn\'t exist, or has been removed.<' + OFFLINE_PATTERN = r'>This file doesn\'t exist, or has been removed.<' FILE_URL_REPLACEMENTS = [(__pattern__, r'http://www.sockshare.com/file/\g')] diff --git a/module/plugins/hoster/StreamCz.py b/module/plugins/hoster/StreamCz.py index bbef31a67..227324097 100644 --- a/module/plugins/hoster/StreamCz.py +++ b/module/plugins/hoster/StreamCz.py @@ -28,7 +28,7 @@ def getInfo(urls): for url in urls: html = getURL(url) - if re.search(StreamCz.FILE_OFFLINE_PATTERN, html): + if re.search(StreamCz.OFFLINE_PATTERN, html): # File offline result.append((url, 0, 1, url)) else: @@ -45,7 +45,7 @@ class StreamCz(Hoster): __author_name__ = "zoidberg" __author_mail__ = "zoidberg@mujmail.cz" - FILE_OFFLINE_PATTERN = r'

    Str.nku nebylo mo.n. nal.zt \(404\)

    ' + OFFLINE_PATTERN = r'

    Str.nku nebylo mo.n. nal.zt \(404\)

    ' FILE_NAME_PATTERN = r'' CDN_PATTERN = r'\d+)(?:&cdnLQ=(?P\d*))?(?:&cdnHQ=(?P\d*))?(?:&cdnHD=(?P\d*))?&' @@ -57,7 +57,7 @@ class StreamCz(Hoster): self.html = self.load(pyfile.url, decode=True) - if re.search(self.FILE_OFFLINE_PATTERN, self.html): + if re.search(self.OFFLINE_PATTERN, self.html): self.offline() found = re.search(self.CDN_PATTERN, self.html) diff --git a/module/plugins/hoster/TurbobitNet.py b/module/plugins/hoster/TurbobitNet.py index f15b8b0c4..af9cdc59f 100644 --- a/module/plugins/hoster/TurbobitNet.py +++ b/module/plugins/hoster/TurbobitNet.py @@ -45,7 +45,7 @@ class TurbobitNet(SimpleHoster): # long filenames are shortened FILE_INFO_PATTERN = r"\w+).*", "http://turbobit.net/\g.html")] SH_COOKIES = [("turbobit.net", "user_lang", "en")] diff --git a/module/plugins/hoster/TusfilesNet.py b/module/plugins/hoster/TusfilesNet.py index c31b88f20..f42685a63 100644 --- a/module/plugins/hoster/TusfilesNet.py +++ b/module/plugins/hoster/TusfilesNet.py @@ -29,7 +29,7 @@ class TusfilesNet(XFileSharingPro): HOSTER_NAME = "tusfiles.net" FILE_INFO_PATTERN = r'\](?P.+) - (?P[\d.]+) (?P\w+)\[' - FILE_OFFLINE_PATTERN = r'>File Not Found|TusFiles - Fast Sharing Files!' + OFFLINE_PATTERN = r'>File Not Found|<Title>TusFiles - Fast Sharing Files!' SH_COOKIES = [(".tusfiles.net", "lang", "english")] diff --git a/module/plugins/hoster/TwoSharedCom.py b/module/plugins/hoster/TwoSharedCom.py index 7881ca098..bb9737d2e 100644 --- a/module/plugins/hoster/TwoSharedCom.py +++ b/module/plugins/hoster/TwoSharedCom.py @@ -16,7 +16,7 @@ class TwoSharedCom(SimpleHoster): FILE_NAME_PATTERN = r'<h1>(?P<N>.*)</h1>' FILE_SIZE_PATTERN = r'<span class="dtitle">File size:</span>\s*(?P<S>[0-9,.]+) (?P<U>[kKMG])i?B' - FILE_OFFLINE_PATTERN = r'The file link that you requested is not valid\.|This file was deleted\.' + OFFLINE_PATTERN = r'The file link that you requested is not valid\.|This file was deleted\.' DOWNLOAD_URL_PATTERN = r"window.location ='([^']+)';" def setup(self): diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py index 282d4605b..d540505f1 100644 --- a/module/plugins/hoster/UlozTo.py +++ b/module/plugins/hoster/UlozTo.py @@ -39,7 +39,7 @@ class UlozTo(SimpleHoster): FILE_NAME_PATTERN = r'<title>(?P<N>[^<]+) \| Uloz.to' FILE_SIZE_PATTERN = r'.*?(?P[0-9.]+\s[kMG]?B)' FILE_INFO_PATTERN = r'

    File (?P[^<]+) is password protected

    ' - FILE_OFFLINE_PATTERN = r'404 - Page not found|

    File (has been deleted|was banned)

    ' + OFFLINE_PATTERN = r'404 - Page not found|

    File (has been deleted|was banned)

    ' FILE_SIZE_REPLACEMENTS = [('([0-9.]+)\s([kMG])B', convertDecimalPrefix)] FILE_URL_REPLACEMENTS = [(r"(?<=http://)([^/]+)", "www.ulozto.net")] @@ -142,7 +142,7 @@ class UlozTo(SimpleHoster): def doCheckDownload(self): check = self.checkDownload({ "wrong_captcha": re.compile(r'

    \s*Size: (?P\d+) (?P[kKmMgG]?i?[bB])' + FILE_INFO_PATTERN = r'(?P<N>.+) \/\/ Load.to' + FILE_SIZE_PATTERN = r']+>(?P.+)

    \s*Size: (?P.*) (?P[kKmMgG]?i?[bB])' URL_PATTERN = r'
    404 Not Found")}) if check == "404": self.logWarning("The captcha you entered was incorrect. Please try again.") -- cgit v1.2.3 From 28efa58f2f7a4ee68516d92b869f2581a19c60e0 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 9 Jul 2014 21:51:19 +0200 Subject: New hoster RemixshareCom --- module/plugins/hoster/RemixshareCom.py | 56 ++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 module/plugins/hoster/RemixshareCom.py (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/RemixshareCom.py b/module/plugins/hoster/RemixshareCom.py new file mode 100644 index 000000000..dedb3b8e1 --- /dev/null +++ b/module/plugins/hoster/RemixshareCom.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +#Testlink: +#http://remixshare.com/download/p946u +# +# The remixshare.com website is very very slow, so +# if your download not starts because of pycurl timeouts: +# Adjust timeouts in /usr/share/pyload/module/network/HTTPRequest.py +# + +import re + +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class RemixshareCom(SimpleHoster): + __name__ = "RemixshareCom" + __type__ = "hoster" + __pattern__ = r'https?://remixshare\.com/(download|dl)/\w+' + __version__ = "0.01" + __description__ = """Remixshare.com hoster plugin""" + __author_name__ = ("zapp-brannigan", "Walter Purcaro") + __author_mail__ = ("fuerst.reinje@web.de", "vuolter@gmail.com") + + FILE_INFO_PATTERN = r'title=\'.+?\'>(?P.+?) \((?P\d+) (?P\w+)\)<' + OFFLINE_PATTERN = r'

    Ooops!<' + + WAIT_PATTERN = r'var XYZ = "(\d+)"' + FILE_URL_PATTERN = r'(http://remixshare.com/downloadfinal/.+?)"' + FILE_TOKEN_PATTERN = r'var acc = (\d+)' + + + def setup(self): + self.multiDL = True + self.chunkLimit = 1 + + def handleFree(self): + b = re.search(self.FILE_URL_PATTERN, self.html) + if not b: + self.fail("Can not parse download url") + c = re.search(self.FILE_TOKEN_PATTERN, self.html) + if not c: + self.fail("Can not parse file token") + dl_url = b.group(1) + c.group(1) + + #Check if we have to wait + seconds = re.search(self.WAIT_PATTERN, self.html) + if seconds: + self.logDebug("Wait " + seconds.group(1)) + self.wait(seconds.group(1)) + + # Finally start downloading... + self.logDebug("Download-URL: " + dl_url) + self.download(dl_url, disposition=True) + + +getInfo = create_getInfo(RemixshareCom) -- cgit v1.2.3 From 3e6e2e858cd17439992a45afa2c4e9bf5f2da177 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 9 Jul 2014 22:16:30 +0200 Subject: [FiredriveCom] Handle parse error --- module/plugins/hoster/FiredriveCom.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/FiredriveCom.py b/module/plugins/hoster/FiredriveCom.py index 4dce23462..6a77ded55 100644 --- a/module/plugins/hoster/FiredriveCom.py +++ b/module/plugins/hoster/FiredriveCom.py @@ -23,7 +23,7 @@ class FiredriveCom(SimpleHoster): __name__ = "FiredriveCom" __type__ = "hoster" __pattern__ = r'https?://(?:www\.)?(firedrive|putlocker)\.com/(mobile/)?(file|embed)/(?P\w+)' - __version__ = "0.02" + __version__ = "0.03" __description__ = """Firedrive.com hoster plugin""" __author_name__ = "Walter Purcaro" __author_mail__ = "vuolter@gmail.com" @@ -35,6 +35,9 @@ class FiredriveCom(SimpleHoster): FILE_URL_REPLACEMENTS = [(__pattern__, r'http://www.firedrive.com/file/\g')] + LINK_PATTERN = r' Date: Thu, 10 Jul 2014 01:19:31 +0200 Subject: [WarserverCz] Mark as DeadHoster --- module/plugins/hoster/WarserverCz.py | 73 +++--------------------------------- 1 file changed, 6 insertions(+), 67 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/WarserverCz.py b/module/plugins/hoster/WarserverCz.py index 1a3a707b7..73c5b6bc7 100644 --- a/module/plugins/hoster/WarserverCz.py +++ b/module/plugins/hoster/WarserverCz.py @@ -1,77 +1,16 @@ # -*- coding: utf-8 -*- -""" - 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. +from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . - - @author: zoidberg -""" - -#similar to coolshare.cz (down) - -import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -from module.network.HTTPRequest import BadHeader -from module.utils import html_unescape - - -class WarserverCz(SimpleHoster): +class WarserverCz(DeadHoster): __name__ = "WarserverCz" __type__ = "hoster" - __pattern__ = r'http://(?:www\.)?warserver.cz/stahnout/(?P\d+)/.+' - __version__ = "0.12" + __pattern__ = r'http://(?:www\.)?warserver\.cz/stahnout/\d+' + __version__ = "0.13" __description__ = """Warserver.cz hoster plugin""" - __author_name__ = "zoidberg" - __author_mail__ = "zoidberg@mujmail.cz" - - FILE_NAME_PATTERN = r'(?P[^<]+)

    ' - FILE_SIZE_PATTERN = r'
  • Velikost: (?P[^<]+)' - OFFLINE_PATTERN = r'

    Soubor nenalezen

    ' - - PREMIUM_URL_PATTERN = r'href="(http://[^/]+/dwn-premium.php.*?)"' - DOMAIN = "http://csd01.coolshare.cz" - - DOMAIN = "http://s01.warserver.cz" - - def handleFree(self): - try: - self.download("%s/dwn-free.php?fid=%s" % (self.DOMAIN, self.file_info['ID'])) - except BadHeader, e: - self.logError(e) - if e.code == 403: - self.longWait(60, 60) - else: - raise - self.checkDownloadedFile() - - def handlePremium(self): - found = re.search(self.PREMIUM_URL_PATTERN, self.html) - if not found: - self.parseError("Premium URL") - url = html_unescape(found.group(1)) - self.logDebug("Premium URL: " + url) - if not url.startswith("http://"): - self.resetAccount() - self.download(url) - self.checkDownloadedFile() - - def checkDownloadedFile(self): - check = self.checkDownload({ - "offline": ">404 Not Found<" - }) - - if check == "offline": - self.offline() + __author_name__ = "Walter Purcaro" + __author_mail__ = "vuolter@gmail.com" getInfo = create_getInfo(WarserverCz) -- cgit v1.2.3 From 04038a2cf0c4c2d9cc9a0c8e8bf9beb6426afae8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 10 Jul 2014 03:02:26 +0200 Subject: Use parseError instead PluginParseError + unified all download pattern attributes as LINK_PATTERN + removed some old patterns (not used anymore) + other code cosmetics --- module/plugins/hoster/BasePlugin.py | 1 + module/plugins/hoster/BayfilesCom.py | 4 ++-- module/plugins/hoster/BitshareCom.py | 8 ++++---- module/plugins/hoster/CatShareNet.py | 5 ++++- module/plugins/hoster/CramitIn.py | 2 +- module/plugins/hoster/CrockoCom.py | 3 ++- module/plugins/hoster/CzshareCom.py | 10 ++++++---- module/plugins/hoster/DataHu.py | 4 ++-- module/plugins/hoster/DataportCz.py | 10 ++++++---- module/plugins/hoster/DepositfilesCom.py | 4 ++-- module/plugins/hoster/DlFreeFr.py | 6 +++--- module/plugins/hoster/EasybytezCom.py | 5 ++--- module/plugins/hoster/EdiskCz.py | 9 +++++---- module/plugins/hoster/EgoFilesCom.py | 9 +++++---- module/plugins/hoster/EuroshareEu.py | 1 + module/plugins/hoster/ExtabitCom.py | 6 +++--- module/plugins/hoster/FastshareCz.py | 6 ++++-- module/plugins/hoster/File4safeCom.py | 2 +- module/plugins/hoster/FileParadoxIn.py | 2 +- module/plugins/hoster/FilecloudIo.py | 15 ++++++++------- module/plugins/hoster/FilefactoryCom.py | 4 ++-- module/plugins/hoster/FileomCom.py | 2 +- module/plugins/hoster/FilerNet.py | 9 +++++---- module/plugins/hoster/FilerioCom.py | 2 +- module/plugins/hoster/FileserveCom.py | 6 +++--- module/plugins/hoster/FileshareInUa.py | 2 +- module/plugins/hoster/FilezyNet.py | 2 +- module/plugins/hoster/FourSharedCom.py | 10 ++++++---- module/plugins/hoster/FreevideoCz.py | 6 ++++-- module/plugins/hoster/FshareVn.py | 8 +++++--- module/plugins/hoster/GamefrontCom.py | 2 +- module/plugins/hoster/IFileWs.py | 5 ++--- module/plugins/hoster/IfileIt.py | 4 ++-- module/plugins/hoster/IfolderRu.py | 4 ++-- module/plugins/hoster/JumbofilesCom.py | 8 ++++---- module/plugins/hoster/Keep2shareCC.py | 7 ++++--- module/plugins/hoster/LetitbitNet.py | 20 ++++++++++++-------- module/plugins/hoster/LoadTo.py | 10 ++++++---- module/plugins/hoster/LuckyShareNet.py | 5 +++-- module/plugins/hoster/MediafireCom.py | 4 ++-- module/plugins/hoster/MegasharesCom.py | 12 +++++++----- module/plugins/hoster/MovReelCom.py | 5 +---- module/plugins/hoster/NarodRu.py | 4 ++-- module/plugins/hoster/NosuploadCom.py | 4 ++-- module/plugins/hoster/NovafileCom.py | 2 +- module/plugins/hoster/NowDownloadEu.py | 18 ++++++++++-------- module/plugins/hoster/OboomCom.py | 1 + module/plugins/hoster/OneFichierCom.py | 4 ++-- module/plugins/hoster/PandaPlanet.py | 2 +- module/plugins/hoster/PromptfileCom.py | 4 ++-- module/plugins/hoster/RapidgatorNet.py | 6 +++--- module/plugins/hoster/RarefileNet.py | 2 +- module/plugins/hoster/RemixshareCom.py | 26 ++++++++++++++------------ module/plugins/hoster/RgHostNet.py | 4 ++-- module/plugins/hoster/RyushareCom.py | 2 +- module/plugins/hoster/SecureUploadEu.py | 4 ++-- module/plugins/hoster/SendspaceCom.py | 6 ++++-- module/plugins/hoster/Share4webCom.py | 2 +- module/plugins/hoster/ShareRapidCom.py | 7 ++++--- module/plugins/hoster/StreamcloudEu.py | 6 +++--- module/plugins/hoster/TurbobitNet.py | 13 +++++++------ module/plugins/hoster/TwoSharedCom.py | 6 ++++-- module/plugins/hoster/UlozTo.py | 4 +++- module/plugins/hoster/UloziskoSk.py | 18 ++++++++++-------- module/plugins/hoster/UnibytesCom.py | 12 +++++++----- module/plugins/hoster/UploadedTo.py | 2 +- module/plugins/hoster/UploadheroCom.py | 7 ++++--- module/plugins/hoster/UploadingCom.py | 8 ++++---- module/plugins/hoster/UpstoreNet.py | 6 +++--- module/plugins/hoster/UptoboxCom.py | 2 +- module/plugins/hoster/VidPlayNet.py | 2 +- module/plugins/hoster/XFileSharingPro.py | 22 ++++++++++++---------- module/plugins/hoster/YibaishiwuCom.py | 5 +++-- 73 files changed, 254 insertions(+), 206 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py index 970ac8081..68b98e0a7 100644 --- a/module/plugins/hoster/BasePlugin.py +++ b/module/plugins/hoster/BasePlugin.py @@ -18,6 +18,7 @@ class BasePlugin(Hoster): __author_name__ = "RaNaN" __author_mail__ = "RaNaN@pyload.org" + def setup(self): self.chunkLimit = -1 self.resumeDownload = True diff --git a/module/plugins/hoster/BayfilesCom.py b/module/plugins/hoster/BayfilesCom.py index 82dd11446..28f3c2e92 100644 --- a/module/plugins/hoster/BayfilesCom.py +++ b/module/plugins/hoster/BayfilesCom.py @@ -38,7 +38,7 @@ class BayfilesCom(SimpleHoster): WAIT_PATTERN = r'>Your IP [0-9.]* has recently downloaded a file\. Upgrade to premium or wait (\d+) minutes\.<' VARS_PATTERN = r'var vfid = (\d+);\s*var delay = (\d+);' - LINK_PATTERN = r"javascript:window.location.href = '([^']+)';" + FREE_LINK_PATTERN = r"javascript:window.location.href = '([^']+)';" PREMIUM_LINK_PATTERN = r'(?:
    We are sorry, but the requested file was not found in our database|>Error - File not available<|The file was deleted either by the uploader, inactivity or due to copyright claim)' FILE_INFO_PATTERN = r'Downloading (?P.+) - (?P[\d.]+) (?P\w+)' FILE_AJAXID_PATTERN = r'var ajaxdl = "(.*?)";' - CAPTCHA_KEY_PATTERN = r"http://api\.recaptcha\.net/challenge\?k=(.*?) " - TRAFFIC_USED_UP = r"Your Traffic is used up for today. Upgrade to premium to continue!" + CAPTCHA_KEY_PATTERN = r'http://api\.recaptcha\.net/challenge\?k=(.*?) ' + TRAFFIC_USED_UP = r'Your Traffic is used up for today. Upgrade to premium to continue!' def setup(self): - self.req.cj.setCookie(self.HOSTER_DOMAIN, "language_selection", "EN") + self.req.cj.setCookie(self.HOSTER_NAME, "language_selection", "EN") self.multiDL = self.premium self.chunkLimit = 1 diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index fa84b7732..406b7bcd4 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -16,9 +16,12 @@ class CatShareNet(SimpleHoster): FILE_INFO_PATTERN = r'

    ]+>(?P.*)

    \s+

    ]+>(?P.*)

    ' OFFLINE_PATTERN = r'Podany plik zosta' - SECONDS_PATTERN = 'var\s+count\s+=\s+(\d+);' + + SECONDS_PATTERN = r'var\s+count\s+=\s+(\d+);' + RECAPTCHA_KEY = "6Lfln9kSAAAAANZ9JtHSOgxUPB9qfDFeLUI_QMEy" + def handleFree(self): found = re.search(self.SECONDS_PATTERN, self.html) seconds = int(found.group(1)) diff --git a/module/plugins/hoster/CramitIn.py b/module/plugins/hoster/CramitIn.py index e882f5cea..79ed07e73 100644 --- a/module/plugins/hoster/CramitIn.py +++ b/module/plugins/hoster/CramitIn.py @@ -15,7 +15,7 @@ class CramitIn(XFileSharingPro): HOSTER_NAME = "cramit.in" FILE_INFO_PATTERN = r'\s*(?P.*?).*?\s*\((?P.*?)\)' - DIRECT_LINK_PATTERN = r'href="(http://cramit.in/file_download/.*?)"' + LINK_PATTERN = r'href="(http://cramit.in/file_download/.*?)"' def setup(self): self.resumeDownload = self.multiDL = self.premium diff --git a/module/plugins/hoster/CrockoCom.py b/module/plugins/hoster/CrockoCom.py index 3d7360769..286d5ca2f 100644 --- a/module/plugins/hoster/CrockoCom.py +++ b/module/plugins/hoster/CrockoCom.py @@ -18,7 +18,7 @@ class CrockoCom(SimpleHoster): FILE_NAME_PATTERN = r'Download:\s*(?P.*)' FILE_SIZE_PATTERN = r'(?P[^<]+)' OFFLINE_PATTERN = r"

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

    |File not found" - DOWNLOAD_URL_PATTERN = r"window.location ='([^']+)';" + CAPTCHA_URL_PATTERN = re.compile(r"u='(/file_contents/captcha/\w+)';\s*w='(\d+)';") CAPTCHA_KEY_PATTERN = re.compile(r'Recaptcha.create\("([^"]+)"') @@ -27,6 +27,7 @@ class CrockoCom(SimpleHoster): FILE_NAME_REPLACEMENTS = [(r'<[^>]*>', '')] + def handleFree(self): if "You need Premium membership to download this file." in self.html: self.fail("You need Premium membership to download this file.") diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py index 5fab87157..ba43d8054 100644 --- a/module/plugins/hoster/CzshareCom.py +++ b/module/plugins/hoster/CzshareCom.py @@ -21,7 +21,7 @@ # http://czshare.com/5278880/random.bin import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, PluginParseError +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo from module.utils import parseFileSize @@ -40,6 +40,7 @@ class CzshareCom(SimpleHoster): FILE_SIZE_REPLACEMENTS = [(' ', '')] FILE_URL_REPLACEMENTS = [(r'http://[^/]*/download.php\?.*?id=(\w+).*', r'http://sdilej.cz/\1/x/')] + SH_CHECK_TRAFFIC = True FREE_URL_PATTERN = r'
    [^>]*alt="([^"]+)" />' @@ -49,6 +50,7 @@ class CzshareCom(SimpleHoster): MULTIDL_PATTERN = r"

    Z[^<]*PROFI.

    " USER_CREDIT_PATTERN = r'
    \s*kredit: ([0-9., ]+)([kKMG]i?B)\s*
    ' + def checkTrafficLeft(self): # check if user logged in found = re.search(self.USER_CREDIT_PATTERN, self.html) @@ -90,7 +92,7 @@ class CzshareCom(SimpleHoster): # get free url found = re.search(self.FREE_URL_PATTERN, self.html) if found is None: - raise PluginParseError('Free URL') + self.parseError('Free URL') parsed_url = "http://sdilej.cz" + found.group(1) self.logDebug("PARSED_URL:" + parsed_url) @@ -105,7 +107,7 @@ class CzshareCom(SimpleHoster): self.pyfile.size = int(inputs['size']) except Exception, e: self.logError(e) - raise PluginParseError('Form') + self.parseError('Form') # get and decrypt captcha captcha_url = 'http://sdilej.cz/captcha.php' @@ -129,7 +131,7 @@ class CzshareCom(SimpleHoster): self.logDebug("WAIT URL", self.req.lastEffectiveURL) found = re.search("free_wait.php\?server=(.*?)&(.*)", self.req.lastEffectiveURL) if not found: - raise PluginParseError('Download URL') + self.parseError('Download URL') url = "http://%s/download.php?%s" % (found.group(1), found.group(2)) diff --git a/module/plugins/hoster/DataHu.py b/module/plugins/hoster/DataHu.py index 74333d743..9a7af288b 100644 --- a/module/plugins/hoster/DataHu.py +++ b/module/plugins/hoster/DataHu.py @@ -33,13 +33,13 @@ class DataHu(SimpleHoster): FILE_INFO_PATTERN = ur'(?P<N>.*) \((?P<S>[^)]+)\) let\xf6lt\xe9se' OFFLINE_PATTERN = ur'Az adott f\xe1jl nem l\xe9tezik' - DIRECT_LINK_PATTERN = r'
    ' + LINK_PATTERN = r'
    ' def handleFree(self): self.resumeDownload = True self.html = self.load(self.pyfile.url, decode=True) - m = re.search(self.DIRECT_LINK_PATTERN, self.html) + m = re.search(self.LINK_PATTERN, self.html) if m: url = m.group(1) self.logDebug('Direct link: ' + url) diff --git a/module/plugins/hoster/DataportCz.py b/module/plugins/hoster/DataportCz.py index a5ff05f39..582312b29 100644 --- a/module/plugins/hoster/DataportCz.py +++ b/module/plugins/hoster/DataportCz.py @@ -17,7 +17,7 @@ @author: zoidberg """ -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, PluginParseError +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class DataportCz(SimpleHoster): @@ -32,11 +32,13 @@ class DataportCz(SimpleHoster): FILE_NAME_PATTERN = r'(?P[^<]+)' FILE_SIZE_PATTERN = r'Velikost\s*(?P[^<]+)' OFFLINE_PATTERN = r'

    Soubor nebyl nalezen

    ' + FILE_URL_REPLACEMENTS = [(__pattern__, r'http://www.dataport.cz/file/\1')] CAPTCHA_URL_PATTERN = r'
    \s*(\d+)
    ' + def handleFree(self): captchas = {"1": "jkeG", "2": "hMJQ", "3": "vmEK", "4": "ePQM", "5": "blBd"} @@ -44,19 +46,19 @@ class DataportCz(SimpleHoster): action, inputs = self.parseHtmlForm('free_download_form') self.logDebug(action, inputs) if not action or not inputs: - raise PluginParseError('free_download_form') + self.parseError('free_download_form') if "captchaId" in inputs and inputs["captchaId"] in captchas: inputs['captchaCode'] = captchas[inputs["captchaId"]] else: - raise PluginParseError('captcha') + self.parseError('captcha') self.html = self.download("http://www.dataport.cz%s" % action, post=inputs) check = self.checkDownload({"captcha": 'alert("\u0160patn\u011b opsan\u00fd k\u00f3d z obr\u00e1zu");', "slot": 'alert("Je n\u00e1m l\u00edto, ale moment\u00e1ln\u011b nejsou'}) if check == "captcha": - raise PluginParseError('invalid captcha') + self.parseError('invalid captcha') elif check == "slot": self.logDebug("No free slots - wait 60s and retry") self.wait(60, False) diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py index 7b9713861..9089aecff 100644 --- a/module/plugins/hoster/DepositfilesCom.py +++ b/module/plugins/hoster/DepositfilesCom.py @@ -23,7 +23,7 @@ class DepositfilesCom(SimpleHoster): (r'.*")] RECAPTCHA_PATTERN = r"Recaptcha.create\('([^']+)'" - DOWNLOAD_LINK_PATTERN = r'\s*]*>(?P[^>]*)" - FILE_SIZE_PATTERN = r"Taille:\s*]*>(?P[\d.]+[KMG])o" + FILE_NAME_PATTERN = r'Fichier:\s*]*>(?P[^>]*)' + FILE_SIZE_PATTERN = r'Taille:\s*]*>(?P[\d.]+[KMG])o' OFFLINE_PATTERN = r"Erreur 404 - Document non trouv|Fichier inexistant|Le fichier demandé n'a pas été trouvé" - #FILE_URL_PATTERN = r'href="(?Phttp://.*?)">Télécharger ce fichier' + def setup(self): self.multiDL = self.resumeDownload = True diff --git a/module/plugins/hoster/EasybytezCom.py b/module/plugins/hoster/EasybytezCom.py index 43f823404..9926c80f0 100644 --- a/module/plugins/hoster/EasybytezCom.py +++ b/module/plugins/hoster/EasybytezCom.py @@ -34,9 +34,8 @@ class EasybytezCom(XFileSharingPro): FILE_INFO_PATTERN = r'(?P.+)
    \s*(?P[^<]+)' OFFLINE_PATTERN = r'

    File not available

    ' - DIRECT_LINK_PATTERN = r'(http://(\w+\.(easyload|easybytez|zingload)\.(com|to)|\d+\.\d+\.\d+\.\d+)/files/\d+/\w+/[^"<]+)' - OVR_DOWNLOAD_LINK_PATTERN = r'

    Download Link

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

    Delete Link

    \s*]*>([^<]+)' + LINK_PATTERN = r'(http://(\w+\.(easyload|easybytez|zingload)\.(com|to)|\d+\.\d+\.\d+\.\d+)/files/\d+/\w+/[^"<]+)' + OVR_LINK_PATTERN = r'

    Download Link

    \s*]*>([^<]+)' ERROR_PATTERN = r'(?:class=["\']err["\'][^>]*>|
    )(.*?)' FILE_INFO_PATTERN = r'\s*.*?\((?P[0-9.]*) (?P[kKMG])i?B\)' - ACTION_PATTERN = r'/en/download/(\d+/.*\.html)' - DLLINK_PATTERN = r'http://.*edisk.cz.*\.html' OFFLINE_PATTERN = r'

    This file does not exist due to one of the following: