You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
在请求的过程中, sdk 导致程序退出, 不能让我一下子将内容搜索完成, 具体报错如下:
"the access token expires, please re-run [zoomeye init] command. it is recommended to use API KEY for initialization!"
但是我的 api_key 貌似没有问题, 在命令行使用 zoomeye search 'title:"Scam List of Tor"' -type host -num 1 依然能够搜索.
进而在sdk.py _request 方法加入输出日志代码:
# if response succeed and status code is not 200 return error format json
# others error return unknown error
# mainly users initialized by username and password, access token expires after 12 hours
else:
print(params)
print('-'*20)
print(resp.text)
raise ValueError(resp.json().get('message'))
我有个问题:
我正在使用 zoomeye-python, 我有大概25w的标题, 需要通过zoomeye搜索标题对应的结果, 并储存. 我的伪代码如下:
for {
response = cli_zoomeye.request_data()
response.save()
}
在请求的过程中, sdk 导致程序退出, 不能让我一下子将内容搜索完成, 具体报错如下:
"the access token expires, please re-run [zoomeye init] command. it is recommended to use API KEY for initialization!"
但是我的 api_key 貌似没有问题, 在命令行使用
zoomeye search 'title:"Scam List of Tor"' -type host -num 1
依然能够搜索.进而在sdk.py _request 方法加入输出日志代码:
# if response succeed and status code is not 200 return error format json
# others error return unknown error
# mainly users initialized by username and password, access token expires after 12 hours
else:
print(params)
print('-'*20)
print(resp.text)
raise ValueError(resp.json().get('message'))
得到以下内部报错的输出:
{'query': 'title:"Загрузка фотографии :: SECTUM"', 'page': 1, 'facets': 'app,device,service,os,port,country,city'}
--------------------
{"error": "internal_error", "message": "internal error", "url": "https://www.zoomeye.org/api"}
推测是搜索内容, 引起了服务的内部错误, 导致程序退出.
请问有什么好的办法可以避免这个问题呢?
The text was updated successfully, but these errors were encountered: