找到如何调用Phishtank API真的很痛苦here 。 经过大量搜索,我找到了如何调用 API。下面是一个示例调用,
https://checkurl.phishtank.com/checkurl/index.php?url=http://auto.smtpsystems.net/&format=json
但是上述调用的问题是它以 XML 格式给出响应,而我想要 JSON 格式的响应。
任何形式的帮助将不胜感激。
最佳答案
确保在端点 URL 中使用 https
而不是 http
,尽管在 Documentation 中。给出了 http
(截至撰写本文时)。
使用 HTTP POST
请求而不是 HTTP GET
。
并且格式
用引号括起来(双倍优先)
# Python implementation
endpoint = "https://checkurl.phishtank.com/checkurl/"
url = "http://www.travelswitchfly.com/"
response = requests.post(endpoint, data={"url": url, "format": "json"})
关于api - 如何调用 Phishtank API 获取 JSON 响应?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50347616/