summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/plugins/hooks/UserAgentSwitcher.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/plugins/hooks/UserAgentSwitcher.py b/module/plugins/hooks/UserAgentSwitcher.py
index 31eac9820..b0cf66709 100644
--- a/module/plugins/hooks/UserAgentSwitcher.py
+++ b/module/plugins/hooks/UserAgentSwitcher.py
@@ -8,7 +8,7 @@ from module.plugins.Hook import Hook
class UserAgentSwitcher(Hook):
__name__ = "UserAgentSwitcher"
__type__ = "hook"
- __version__ = "0.02"
+ __version__ = "0.03"
__config__ = [("activated", "bool", "Activated" , True ),
("ua" , "str" , "Custom user-agent string", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0")]
@@ -29,4 +29,4 @@ class UserAgentSwitcher(Hook):
ua = self.getConfig('ua')
if ua:
self.logDebug("Use custom user-agent string: " + ua)
- pyfile.plugin.req.http.c.setopt(pycurl.USERAGENT, ua)
+ pyfile.plugin.req.http.c.setopt(pycurl.USERAGENT, ua.encode('utf-8'))