diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-25 14:06:56 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-25 14:06:56 +0200 |
commit | fac22f3f706f247536ee11c15ae63b0988a2cc6b (patch) | |
tree | 564ad234325547aa6fc949c895adf22f9b0522bb /module/plugins | |
parent | [GoogledriveCom] Improve __pattern__ (diff) | |
download | pyload-fac22f3f706f247536ee11c15ae63b0988a2cc6b.tar.xz |
[UserAgentSwitcher] Fixup (2)
Diffstat (limited to 'module/plugins')
-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 0a0072e63..16d38d2cc 100644 --- a/module/plugins/hooks/UserAgentSwitcher.py +++ b/module/plugins/hooks/UserAgentSwitcher.py @@ -9,7 +9,7 @@ from module.utils import encode class UserAgentSwitcher(Hook): __name__ = "UserAgentSwitcher" __type__ = "hook" - __version__ = "0.05" + __version__ = "0.06" __config__ = [("activated", "bool", "Activated" , True ), ("useragent", "str" , "Custom user-agent string" , "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0")] @@ -27,7 +27,7 @@ class UserAgentSwitcher(Hook): def downloadPreparing(self, pyfile): - useragent = encode(self.getConfig('useragent')) + useragent = self.getConfig('useragent').encode("utf8", "replace") #@TODO: Remove `encode` in 0.4.10 if useragent: self.logDebug("Use custom user-agent string: " + useragent) pyfile.plugin.req.http.c.setopt(pycurl.USERAGENT, useragent) |