From bc2ec03799dbb8479b8e519bb30eb5bf316dec57 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Apr 2015 03:14:32 +0200 Subject: [UserAgentSwitcher] Fix https://github.com/pyload/pyload/issues/1324 --- module/plugins/hooks/UserAgentSwitcher.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hooks/UserAgentSwitcher.py') 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')) -- cgit v1.2.3