mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 04:47:48 +08:00
将api加入到插拔式配置
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import time
|
||||
from config import api
|
||||
from config import settings
|
||||
from common.search import Search
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ class GoogleAPI(Search):
|
||||
self.source = 'GoogleAPISearch'
|
||||
self.addr = 'https://www.googleapis.com/customsearch/v1'
|
||||
self.delay = 1
|
||||
self.key = api.google_api_key
|
||||
self.id = api.google_api_id
|
||||
self.key = settings.google_api_key
|
||||
self.id = settings.google_api_id
|
||||
self.per_page_num = 10 # 每次只能请求10个结果
|
||||
|
||||
def search(self, domain, filtered_subdomain=''):
|
||||
|
||||
Reference in New Issue
Block a user