mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 04:47:48 +08:00
typos
This commit is contained in:
@@ -8,7 +8,6 @@ class Baidu(Search):
|
||||
Search.__init__(self)
|
||||
self.module = 'Search'
|
||||
self.source = 'BaiduSearch'
|
||||
self.init = 'https://www.baidu.com/'
|
||||
self.addr = 'https://www.baidu.com/s'
|
||||
self.domain = domain
|
||||
self.limit_num = 750 # 限制搜索条数
|
||||
@@ -56,10 +55,9 @@ class Baidu(Search):
|
||||
subdomains = self.match_subdomains(resp.text, fuzzy=False)
|
||||
if not subdomains: # 搜索没有发现子域名则停止搜索
|
||||
break
|
||||
if not full_search:
|
||||
# 搜索中发现搜索出的结果有完全重复的结果就停止搜索
|
||||
if subdomains.issubset(self.subdomains):
|
||||
break
|
||||
if not full_search and subdomains.issubset(self.subdomains):
|
||||
# 在全搜索过程中发现搜索出的结果有完全重复的结果就停止搜索
|
||||
break
|
||||
# 合并搜索子域名搜索结果
|
||||
self.subdomains = self.subdomains.union(subdomains)
|
||||
self.page_num += self.per_page_num
|
||||
@@ -94,7 +92,7 @@ class Baidu(Search):
|
||||
self.save_db()
|
||||
|
||||
|
||||
def do(domain): # 统一入口名字 方便多线程调用
|
||||
def run(domain):
|
||||
"""
|
||||
类统一调用入口
|
||||
|
||||
@@ -105,4 +103,4 @@ def do(domain): # 统一入口名字 方便多线程调用
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
do('mi.com')
|
||||
run('mi.com')
|
||||
|
||||
Reference in New Issue
Block a user