diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-07-28 19:22:06 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-07-28 19:22:06 +0200 |
commit | f0df222caaa8544b84d84af2f8ea36783ddd8fb8 (patch) | |
tree | efe2f56c721fe80c2c73eb66ed3a0a6bd04279a6 | |
parent | Fix content-disposition (diff) | |
download | pyload-f0df222caaa8544b84d84af2f8ea36783ddd8fb8.tar.xz |
Fix https://github.com/pyload/pyload/issues/1581
-rw-r--r-- | module/plugins/hooks/UserAgentSwitcher.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/module/plugins/hooks/UserAgentSwitcher.py b/module/plugins/hooks/UserAgentSwitcher.py index dbd18bc2c..52f542268 100644 --- a/module/plugins/hooks/UserAgentSwitcher.py +++ b/module/plugins/hooks/UserAgentSwitcher.py @@ -3,12 +3,13 @@ import pycurl from module.plugins.internal.Addon import Addon +from module.plugins.internal.Plugin import encode class UserAgentSwitcher(Addon): __name__ = "UserAgentSwitcher" __type__ = "hook" - __version__ = "0.10" + __version__ = "0.11" __status__ = "testing" __config__ = [("activated" , "bool", "Activated" , True ), @@ -34,4 +35,4 @@ class UserAgentSwitcher(Addon): if useragent: self.log_debug("Use custom user-agent string: " + useragent) - pyfile.plugin.req.http.c.setopt(pycurl.USERAGENT, useragent) + pyfile.plugin.req.http.c.setopt(pycurl.USERAGENT, encode(useragent)) |