浏览代码

Add Yandex proxy support.

tags/v0.3
Ben Kurtovic 8 年前
父节点
当前提交
76b068c4df
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. +2
    -1
      earwigbot/wiki/copyvios/search.py

+ 2
- 1
earwigbot/wiki/copyvios/search.py 查看文件

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


正在加载...
取消
保存