无法连接到 HateBase API
我无法连接到 HateBase API。我在这里分解了代码以使调试更容易:
key ='blah blah'
base_url = 'https://api.hatebase.org'
url = "https://api.hatebase.org/4-4/authenticate"
payload = "api_key=" + key
response = requests.post(url, data=payload, headers=headers)
token = response.json()
print(token)
输出:
{'datetime': '2022-03-02 18:32:13',
'errors': {'8752': 'The version of the API is now retired; please update your queries to resume accessing the API'},
'important': "Your use of the HateBase API acknowledges your consent with Hatebase's Terms of Use (available online at hatebase.org) and PROHIBITS REDISTRIBUTION of this data for any purpose, including but not limited to republication in any form, such as in PUBLIC CODE REPOSITORIES.",
'query': {'api_key': 'blah blah'},
'version': '4.4'}
我不确定 HateBase API 本身是否存在问题...或者,如果有人知道已经收集了所有 HateBase 的来源,我将不胜感激词汇。
I'm failing to connect to HateBase API. I have broken down the code here to make the debugging easier:
key ='blah blah'
base_url = 'https://api.hatebase.org'
url = "https://api.hatebase.org/4-4/authenticate"
payload = "api_key=" + key
response = requests.post(url, data=payload, headers=headers)
token = response.json()
print(token)
output:
{'datetime': '2022-03-02 18:32:13',
'errors': {'8752': 'The version of the API is now retired; please update your queries to resume accessing the API'},
'important': "Your use of the HateBase API acknowledges your consent with Hatebase's Terms of Use (available online at hatebase.org) and PROHIBITS REDISTRIBUTION of this data for any purpose, including but not limited to republication in any form, such as in PUBLIC CODE REPOSITORIES.",
'query': {'api_key': 'blah blah'},
'version': '4.4'}
I'm not sure if there is a problem with HateBase API itself... Alternatively, I'd be thankful if anyone knows a source that has already collected all HateBase Vocabulary.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
显然 Hatebase 不再得到积极维护,因此他们退役了 Hatebase API。我向他们发送了一封有关此事的电子邮件,他们建议我尝试使用武器化文字。
这对我来说也非常令人沮丧,因为我上次使用 API 是在 2021 年底,所以我不确定发生了什么。我还没有尝试过这个新工具,但我很高兴至少他们提供了另一种选择:)
Apparently Hatebase is no longer being actively maintained, so they retired the Hatebase API. I sent them an email about it and they suggested I try Weaponized Word instead.
That was very frustrating for me as well, because I last used the API end of 2021 so I was not sure what was happening. I haven't tried the new tool yet, but I'm happy that at least they offer an alternative :)