Browse Source

Apparently oauth2 converts the query to unicode.

tags/v0.2
Ben Kurtovic 10 years ago
parent
commit
4f5a22a2e5
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      earwigbot/wiki/copyvios/search.py

+ 1
- 1
earwigbot/wiki/copyvios/search.py View File

@@ -64,7 +64,7 @@ class YahooBOSSSearchEngine(BaseSearchEngine):
@staticmethod @staticmethod
def _build_url(base, params): def _build_url(base, params):
"""Works like urllib.urlencode(), but uses %20 for spaces over +.""" """Works like urllib.urlencode(), but uses %20 for spaces over +."""
enc = lambda s: quote(s, safe="")
enc = lambda s: quote(s.encode("utf8"), safe="")
args = ["=".join((enc(k), enc(v))) for k, v in params.iteritems()] args = ["=".join((enc(k), enc(v))) for k, v in params.iteritems()]
return base + "?" + "&".join(args) return base + "?" + "&".join(args)




Loading…
Cancel
Save