无法连接到 HateBase API

Unable to connect to 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 词汇的来源,我将不胜感激。

显然 Hatebase 不再得到积极维护,因此他们停用了 Hatebase API。我给他们发了一封电子邮件,他们建议我改用 Wea​​ponized Word。

"A good alternative is The Weaponized Word, a new project which is very similar to Hatebase: it's free for eligible academic researchers, and has a multilingual lexicon, an API and a built-in natural language parser. At this time, language coverage on The Weaponized Word is roughly twice the size of Hatebase's lexicon."

这也让我很沮丧,因为我上次使用 API 是在 2021 年底,所以我不确定发生了什么。我还没有尝试过这个新工具,但我很高兴至少他们提供了一个替代工具:)