translate

This commit is contained in:
JrD
2020-05-12 20:16:46 +08:00
parent 654b006a5b
commit 0258636827
11 changed files with 117 additions and 113 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ class Gitee(Search):
if not resp:
break
if resp.status_code != 200:
logger.log('ERROR', f'{self.source}模块搜索出错')
logger.log('ERROR', f'{self.source} module query failed')
break
if 'class="empty-box"' in resp.text:
break
+2 -2
View File
@@ -46,7 +46,7 @@ class GithubAPI(Search):
{'Accept': 'application/vnd.github.v3.text-match+json'})
if not self.auth_github():
logger.log('ERROR', f'{self.source}模块登录失败')
logger.log('ERROR', f'{self.source} module login failed')
return
page = 1
while True:
@@ -58,7 +58,7 @@ class GithubAPI(Search):
logger.log('ERROR', e.args)
break
if resp.status_code != 200:
logger.log('ERROR', f'{self.source}模块搜索出错')
logger.log('ERROR', f'{self.source} module query failed')
break
subdomains = self.match_subdomains(self.domain, resp.text)
if not subdomains:
+2 -2
View File
@@ -23,11 +23,11 @@ class ZoomEyeAPI(Search):
data = {'username': self.user, 'password': self.pwd}
resp = self.post(url=url, json=data)
if not resp:
logger.log('FATAL', f'登录失败无法获取{self.source}的访问token')
logger.log('FATAL', f'{self.source} module login failed, can not get access token')
exit(1)
data = resp.json()
if resp.status_code == 200:
logger.log('DEBUG', f'{self.source}模块登录成功')
logger.log('DEBUG', f'{self.source} module login success')
return data.get('access_token')
else:
logger.log('ALERT', data.get('message'))