diff options
author | Nitzo <nitzo2001@yahoo.com> | 2016-08-02 00:19:06 +0200 |
---|---|---|
committer | Nitzo <nitzo2001@yahoo.com> | 2016-08-02 00:19:06 +0200 |
commit | 9cb8f8b38ff246bd97134b76352ee4943aa28514 (patch) | |
tree | 5db0e6d43bb5b5feaef4bc4cd44ec0360ec42e46 | |
parent | [New Hoster] SmuleCom (fix #2562, fix #2402) (diff) | |
download | pyload-9cb8f8b38ff246bd97134b76352ee4943aa28514.tar.xz |
[SmuleCom] Minor change
-rw-r--r-- | module/plugins/hoster/SmuleCom.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/module/plugins/hoster/SmuleCom.py b/module/plugins/hoster/SmuleCom.py index 865b18698..0187869ef 100644 --- a/module/plugins/hoster/SmuleCom.py +++ b/module/plugins/hoster/SmuleCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster class SmuleCom(SimpleHoster): __name__ = "SmuleCom" __type__ = "hoster" - __version__ = "0.02" + __version__ = "0.03" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?smule\.com/recording/.+' @@ -34,7 +34,8 @@ class SmuleCom(SimpleHoster): info = super(SmuleCom, cls).get_info(url, html) # Unfortunately, NAME_PATTERN does not include file extension so we blindly add '.mp4' as an extension. # (hopefully all links are '.mp4' files) - info['name'] += ".mp4" + if 'name' in info: + info['name'] += ".mp4" return info @@ -59,8 +60,7 @@ class SmuleCom(SimpleHoster): # step 2: from the js code, parse the necessary parts: the decoder function and the headers # as the jscript is fairly long, we'll split it to make parsing easier - if self.JS_SPLIT_WORD: - community_js_code = community_js_code.partition(self.JS_SPLIT_WORD)[0] + community_js_code = community_js_code.partition(self.JS_SPLIT_WORD)[0] m = re.search(self.JS_HEADER_PATTERN, community_js_code) if m is None: |