diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-08 03:14:32 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-08 03:14:32 +0200 |
commit | bc2ec03799dbb8479b8e519bb30eb5bf316dec57 (patch) | |
tree | b77240054950b5149f29d01d8eecc1f48a617d4d /module/plugins/hooks/UserAgentSwitcher.py | |
parent | Merge pull request #1323 from sraedler/stable (diff) | |
download | pyload-bc2ec03799dbb8479b8e519bb30eb5bf316dec57.tar.xz |
[UserAgentSwitcher] Fix https://github.com/pyload/pyload/issues/1324
Diffstat (limited to 'module/plugins/hooks/UserAgentSwitcher.py')
-rw-r--r-- | module/plugins/hooks/UserAgentSwitcher.py | 4 |
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')) |