将api加入到插拔式配置

This commit is contained in:
Jing Ling
2020-08-14 13:00:39 +08:00
parent 091167acb2
commit e16b7dada0
23 changed files with 135 additions and 57 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
import time
from config import api
from config import settings
from common.search import Search
@@ -10,8 +10,8 @@ class BingAPI(Search):
self.module = 'Search'
self.source = 'BingAPISearch'
self.addr = 'https://api.cognitive.microsoft.com/bing/v7.0/search'
self.id = api.bing_api_id
self.key = api.bing_api_key
self.id = settings.bing_api_id
self.key = settings.bing_api_key
self.limit_num = 1000 # 必应同一个搜索关键词限制搜索条数
self.delay = 1 # 必应自定义搜索限制时延1秒