我将“ https://www.cnbc.com/2019/01/13/saudi-energy-minister-on-work-with-oil-producers-to-balance-market.html ”作为 facebook 分享的 url以下链接中的调试器:
我们可以看到 facebook 抓取的所有结果。如果我们向下滚动并看到 URL 部分下列出的条目,我们会看到一个名为 Scrape API 的条目。如果我们点击它,它会打开带有自动填充字段的图形 API 资源管理器。
POST/v3.2/?scrape=true&id=https://www.cnbc.com/2019/01/13/saudi-energy-minister-on-work-with-oil-producers-to-balance-market.html
它以前工作,但突然停止工作。我得到的错误如下所示:
{
"error": {
"message": "Invalid parameter",
"type": "OAuthException",
"code": 100,
"error_subcode": 1611008,
"is_transient": false,
"error_user_title": "Object Missing a Required Value",
"error_user_msg": "Object at URL 'https://www.cnbc.com/2019/01/13/saudi-energy-minister-on-work-with-oil-producers-to-balance-market.html' of type 'article' is invalid because a required property 'al:ios:url' of type 'appsite' was not provided.",
"fbtrace_id": "Gb0BSdJyfGb"
}
}
我在这里想要实现的是获取 facebook 从提供给调试器的 url 中抓取的数据。
编辑1:
如果您使用以下 url 作为测试并按照上述方式执行发布请求。它有效,结果如下:
测试网址: https://www.bloomberg.com/news/articles/2019-01-13/asian-stocks-to-start-mixed-with-earnings-in-focus-markets-wrap?srnd=premium
结果:
{
"url": "https://www.bloomberg.com/news/articles/2019-01-13/asian-stocks-to-start-mixed-with-earnings-in-focus-markets-wrap",
"type": "article",
"title": "Stocks Fall, Bonds Rise as China and Banks Weigh: Markets Wrap",
"image": [
{
"url": "https://assets.bwbx.io/images/users/iqjWHBFdfxIU/iZv8.HNBZJtU/v0/1200x674.jpg"
}
],
"description": "U.S. stocks declined and Treasuries rose as weak Chinese trade data and troubling signals in bank earnings weighed on investor confidence. The dollar edged lower.",
"site_name": "Bloomberg.com",
"updated_time": "2019-01-14T14:38:37+0000",
"id": "2214485868588392"
}
有人可以解释为什么其他 url 不能在调试器中工作吗?