Explorar el Código

Add Yandex proxy support.

tags/v0.3
Ben Kurtovic hace 8 años
padre
commit
76b068c4df
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. +2
    -1
      earwigbot/wiki/copyvios/search.py

+ 2
- 1
earwigbot/wiki/copyvios/search.py Ver fichero

@@ -203,7 +203,8 @@ class YandexSearchEngine(_BaseSearchEngine):
Returns a list of URLs ranked by relevance (as determined by Yandex).
Raises :py:exc:`~earwigbot.exceptions.SearchQueryError` on errors.
"""
url = "https://yandex.com/search/xml"
domain = self.cred.get("proxy", "yandex.com")
url = "https://{0}/search/xml".format(domain)
query = re_sub(r"[^a-zA-Z0-9]", "", query).encode("utf8")
params = {
"user": self.cred["user"],


Cargando…
Cancelar
Guardar