Browse Source

Add Yandex proxy support.

tags/v0.3
Ben Kurtovic 8 years ago
parent
commit
76b068c4df
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      earwigbot/wiki/copyvios/search.py

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

@@ -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"],


Loading…
Cancel
Save