api配置分离

This commit is contained in:
Jing Ling
2020-02-10 20:11:15 +08:00
parent 3f8aa8b74d
commit 38c4de6896
21 changed files with 196 additions and 196 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
import time
import config
import api
from common.search import Search
@@ -11,8 +11,8 @@ class BingAPI(Search):
self.source = 'BingAPISearch'
self.addr = 'https://api.cognitive.microsoft.com/' \
'bingcustomsearch/v7.0/search'
self.id = config.bing_api_id
self.key = config.bing_api_key
self.id = api.bing_api_id
self.key = api.bing_api_key
self.limit_num = 1000 # 必应同一个搜索关键词限制搜索条数
self.delay = 1 # 必应自定义搜索限制时延1秒