diff options
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r-- | module/plugins/hoster/Keep2shareCC.py | 9 | ||||
-rw-r--r-- | module/plugins/hoster/RealdebridCom.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/YoutubeCom.py | 4 |
3 files changed, 11 insertions, 6 deletions
diff --git a/module/plugins/hoster/Keep2shareCC.py b/module/plugins/hoster/Keep2shareCC.py index 5e4f5f540..2eada84ec 100644 --- a/module/plugins/hoster/Keep2shareCC.py +++ b/module/plugins/hoster/Keep2shareCC.py @@ -15,6 +15,9 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # ############################################################################ +# Test links (random.bin): +# http://k2s.cc/file/527111edfb9ba/random.bin + import re from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -24,8 +27,8 @@ from module.plugins.internal.CaptchaService import ReCaptcha class Keep2shareCC(SimpleHoster): __name__ = "Keep2shareCC" __type__ = "hoster" - __pattern__ = r"http://(?:www\.)?keep2share\.cc/file/\w+" - __version__ = "0.03" + __pattern__ = r"http://(?:www\.)?(?:keep2share|k2s)\.cc/file/(?P<ID>.+)" + __version__ = "0.04" __description__ = """Keep2share.cc hoster plugin""" __author_name__ = ("stickell") __author_mail__ = ("l.stickell@yahoo.it") @@ -39,6 +42,8 @@ class Keep2shareCC(SimpleHoster): RECAPTCHA_KEY = '6LcYcN0SAAAAABtMlxKj7X0hRxOY8_2U86kI1vbb' + FILE_URL_REPLACEMENTS = [(__pattern__, r"http://www.keep2share.cc/file/\g<ID>")] + def handleFree(self): fid = re.search(r'<input type="hidden" name="slow_id" value="([^"]+)">', self.html).group(1) self.html = self.load(self.pyfile.url, post={'yt0': '', 'slow_id': fid}) diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py index 59997ee7c..40ee96df9 100644 --- a/module/plugins/hoster/RealdebridCom.py +++ b/module/plugins/hoster/RealdebridCom.py @@ -13,7 +13,7 @@ from module.plugins.Hoster import Hoster class RealdebridCom(Hoster): __name__ = "RealdebridCom" - __version__ = "0.52" + __version__ = "0.53" __type__ = "hoster" __pattern__ = r"https?://.*real-debrid\..*" @@ -48,7 +48,7 @@ class RealdebridCom(Hoster): else: password = password[0] - url = "http://real-debrid.com/ajax/unrestrict.php?lang=en&link=%s&password=%s&time=%s" % ( + url = "https://real-debrid.com/ajax/unrestrict.php?lang=en&link=%s&password=%s&time=%s" % ( quote(pyfile.url, ""), password, int(time() * 1000)) page = self.load(url) data = json_loads(page) diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py index 9ef49c2d6..319eb36e6 100644 --- a/module/plugins/hoster/YoutubeCom.py +++ b/module/plugins/hoster/YoutubeCom.py @@ -36,7 +36,7 @@ class YoutubeCom(Hoster): __name__ = "YoutubeCom" __type__ = "hoster" __pattern__ = r"https?://(?:[^/]*?)youtube\.com/watch.*?[?&]v=.*" - __version__ = "0.37" + __version__ = "0.38" __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), @@ -138,7 +138,7 @@ class YoutubeCom(Hoster): name = re.search(file_name_pattern, html).group(1).replace("/", "") # Cleaning invalid characters from the file name - name = name.encode('latin-1', 'replace') + name = name.encode('ascii', 'replace') pyfile.name = html_unescape(name) |