Sfoglia il codice sorgente

Apparently oauth2 converts the query to unicode.

tags/v0.2
Ben Kurtovic 10 anni fa
parent
commit
4f5a22a2e5
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. +1
    -1
      earwigbot/wiki/copyvios/search.py

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

@@ -64,7 +64,7 @@ class YahooBOSSSearchEngine(BaseSearchEngine):
@staticmethod
def _build_url(base, params):
"""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()]
return base + "?" + "&".join(args)



Caricamento…
Annulla
Salva