diff options
Diffstat (limited to 'module/plugins/hooks/UserAgentSwitcher.py')
-rw-r--r-- | module/plugins/hooks/UserAgentSwitcher.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/module/plugins/hooks/UserAgentSwitcher.py b/module/plugins/hooks/UserAgentSwitcher.py index bd51b30bd..402dd001d 100644 --- a/module/plugins/hooks/UserAgentSwitcher.py +++ b/module/plugins/hooks/UserAgentSwitcher.py @@ -3,7 +3,7 @@ import pycurl from module.plugins.internal.Addon import Addon -from module.plugins.internal.Plugin import encode +from module.plugins.internal.utils import encode class UserAgentSwitcher(Addon): @@ -12,10 +12,10 @@ class UserAgentSwitcher(Addon): __version__ = "0.12" __status__ = "testing" - __config__ = [("activated" , "bool", "Activated" , True ), - ("connecttimeout", "int" , "Connection timeout in seconds" , 60 ), - ("maxredirs" , "int" , "Maximum number of redirects to follow" , 10 ), - ("useragent" , "str" , "Custom user-agent string" , "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0")] + __config__ = [("activated" , "bool", "Activated" , True ), + ("connecttimeout", "int" , "Max timeout for link connection in seconds", 60 ), + ("maxredirs" , "int" , "Maximum number of redirects to follow" , 10 ), + ("useragent" , "str" , "Custom user-agent string" , "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0")] __description__ = """Custom user-agent""" __license__ = "GPLv3" @@ -34,5 +34,5 @@ class UserAgentSwitcher(Addon): pyfile.plugin.req.http.c.setopt(pycurl.MAXREDIRS, maxredirs) if useragent: - self.log_debug("Use custom user-agent string: " + useragent) + self.log_debug("Use custom user-agent string `%s`" % useragent) pyfile.plugin.req.http.c.setopt(pycurl.USERAGENT, encode(useragent)) |