# -*- 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'