mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-10-24 16:46:14 +08:00
优化
This commit is contained in:
@@ -32,7 +32,7 @@ class FoFa(Search):
|
|||||||
'qbase64': query_data,
|
'qbase64': query_data,
|
||||||
'page': self.page_num,
|
'page': self.page_num,
|
||||||
'full': 'true',
|
'full': 'true',
|
||||||
'size': 5000}
|
'size': 1000}
|
||||||
resp = self.get(self.addr, query)
|
resp = self.get(self.addr, query)
|
||||||
if not resp:
|
if not resp:
|
||||||
return
|
return
|
||||||
@@ -42,7 +42,7 @@ class FoFa(Search):
|
|||||||
break
|
break
|
||||||
self.subdomains.update(subdomains)
|
self.subdomains.update(subdomains)
|
||||||
size = resp_json.get('size')
|
size = resp_json.get('size')
|
||||||
if size < 5000:
|
if size < 1000:
|
||||||
break
|
break
|
||||||
self.page_num += 1
|
self.page_num += 1
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import time
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from config import settings
|
from config import settings
|
||||||
from common.search import Search
|
from common.search import Search
|
||||||
@@ -50,6 +52,7 @@ class GithubAPI(Search):
|
|||||||
return
|
return
|
||||||
page = 1
|
page = 1
|
||||||
while True:
|
while True:
|
||||||
|
time.sleep(self.delay)
|
||||||
params = {'q': self.domain, 'per_page': 100,
|
params = {'q': self.domain, 'per_page': 100,
|
||||||
'page': page, 'sort': 'indexed'}
|
'page': page, 'sort': 'indexed'}
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user