From 7beb65e991bc6d1913c3b5bb2ef69e659d5b8342 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 10 Mar 2015 01:55:52 +0100 Subject: Spare code cosmetics --- module/plugins/hoster/XHamsterCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/XHamsterCom.py') diff --git a/module/plugins/hoster/XHamsterCom.py b/module/plugins/hoster/XHamsterCom.py index c6e789fa8..d68f46283 100644 --- a/module/plugins/hoster/XHamsterCom.py +++ b/module/plugins/hoster/XHamsterCom.py @@ -35,8 +35,8 @@ class XHamsterCom(Hoster): if not self.file_exists(): self.offline() - if self.getConfig("type"): - self.desired_fmt = self.getConfig("type") + if self.getConfig('type'): + self.desired_fmt = self.getConfig('type') pyfile.name = self.get_file_name() + self.desired_fmt self.download(self.get_file_url()) -- cgit v1.2.3 From 7d90803262ccbb4fc5296a4dc3ce30fe98f55631 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 25 Mar 2015 23:10:07 +0100 Subject: __config__ cosmetics --- module/plugins/hoster/XHamsterCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/XHamsterCom.py') diff --git a/module/plugins/hoster/XHamsterCom.py b/module/plugins/hoster/XHamsterCom.py index d68f46283..fd494e099 100644 --- a/module/plugins/hoster/XHamsterCom.py +++ b/module/plugins/hoster/XHamsterCom.py @@ -22,7 +22,7 @@ class XHamsterCom(Hoster): __version__ = "0.12" __pattern__ = r'http://(?:www\.)?xhamster\.com/movies/.+' - __config__ = [("type", ".mp4;.flv", "Preferred type", ".mp4")] + __config__ = [("type", ".mp4;.flv", "Preferred type", ".mp4")] __description__ = """XHamster.com hoster plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From 02e3ede3edcf4415ac466fbea9d4f25d9ccc8671 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Apr 2015 15:38:01 +0200 Subject: Spare code cosmetics --- module/plugins/hoster/XHamsterCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/XHamsterCom.py') diff --git a/module/plugins/hoster/XHamsterCom.py b/module/plugins/hoster/XHamsterCom.py index fd494e099..9004dbac0 100644 --- a/module/plugins/hoster/XHamsterCom.py +++ b/module/plugins/hoster/XHamsterCom.py @@ -123,7 +123,7 @@ class XHamsterCom(Hoster): """ if not self.html: self.download_html() - if re.search(r"(.*Video not found.*)", self.html) is not None: + if re.search(r"(.*Video not found.*)", self.html): return False else: return True -- cgit v1.2.3 From 1ef93e913238275f7657d496ba3d2e7eeb5a30a2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 1 May 2015 01:06:01 +0200 Subject: Use 'import' instead 'from' --- module/plugins/hoster/XHamsterCom.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/XHamsterCom.py') diff --git a/module/plugins/hoster/XHamsterCom.py b/module/plugins/hoster/XHamsterCom.py index 9004dbac0..a1711cb0e 100644 --- a/module/plugins/hoster/XHamsterCom.py +++ b/module/plugins/hoster/XHamsterCom.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- import re - -from urllib import unquote +import urllib from module.common.json_layer import json_loads from module.plugins.Hoster import Hoster @@ -83,7 +82,7 @@ class XHamsterCom(Hoster): self.logDebug("long_url = " + long_url) else: if flashvars['file']: - file_url = unquote(flashvars['file']) + file_url = urllib.unquote(flashvars['file']) else: self.error(_("file_url not found")) -- cgit v1.2.3