From 020df65923233fcf1af1b6f2bf92fccde966b946 Mon Sep 17 00:00:00 2001 From: Nitzo Date: Tue, 2 Aug 2016 00:34:45 +0300 Subject: [New Hoster] SmuleCom (fix #2562, fix #2402) --- module/plugins/hoster/SmuleCom.py | 88 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 module/plugins/hoster/SmuleCom.py diff --git a/module/plugins/hoster/SmuleCom.py b/module/plugins/hoster/SmuleCom.py new file mode 100644 index 000000000..865b18698 --- /dev/null +++ b/module/plugins/hoster/SmuleCom.py @@ -0,0 +1,88 @@ +# -*- coding: utf-8 -*- + +import re + +from module.common.JsEngine import JsEngine +from module.plugins.internal.SimpleHoster import SimpleHoster + + +class SmuleCom(SimpleHoster): + __name__ = "SmuleCom" + __type__ = "hoster" + __version__ = "0.02" + __status__ = "testing" + + __pattern__ = r'https?://(?:www\.)?smule\.com/recording/.+' + + __description__ = """SmuleCom hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("igel" , None ), + ("GammaC0de", "nitzo2001[AT]yahoo[DOT]com")] + + + MEDIA_URL_PATTERN = r'initPlayer\(.+?["\']video_media_url["\']:["\'](.+?)["\']' + JS_HEADER_PATTERN = r'(?Pfunction \w+\(\w+\){.+?ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\+.+?}).+?;(?Pvar r=.+?;)' + JS_PROCESS_PATTERN = r'processRecording\s*=\s*function.+?}' + JS_SPLIT_WORD = r'EXIF' # all interesting parts of the javascript function occur before the first occurance of this word + NAME_PATTERN = r'initPlayer\(.+?["\']title["\']:["\'](?P.+?)["\']' + COMMUNITY_JS_PATTERN = r'