从网站提取信息的Web API
我需要一种服务,可以从网页中提取标题,并以json格式返回。我不想自己解析网页,也不想浪费多余的CPU资源。
也就是说,调用这个服务应该像这样:
curl http://api.someservice.com/fetch?url=google.com&element=title&out=json
从这个API得到的响应会是:
{
response: {
title: "Google"
source: "google.com"
}
status: "success"
}
任何提示都会非常感谢