如何调试没有Facebook的URL linter的爬网/缓存链接? [英] How do I debug a crawled/cached link without Facebook's URL linter?

查看:98
本文介绍了如何调试没有Facebook的URL linter的爬网/缓存链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道一旦我发布了一个到Facebook的链接,一个爬虫就会访问该链接,并从og元标记中收集信息并缓存它。使用Facebook 调试器 我可以强制刷新缓存的信息,当我更改共享映像例如。



如果我尝试调用一个URL,如 https://developers.facebook.com/tools/debug/ og / object?q = http%3A%2F%2Fstackexchange.com 在没有登录的情况下以编程方式或直接方式返回登录页面。



有没有一个资源或不同的链接,我可以用来强制刷新内容,而不是在开发者帐户手动执行?

解决方案

https://developers.facebook.com/docs/opengraph/using-objects/#update


当一个动作被发布,或者一个Like按钮指向对象
被点击时,Facebook会'刮取对象的HTML页面,并读取
元标记。对象scrape也会发生在以下情况:




  • 对象URL被输入到对象调试器

  • 第一次刮擦后7天

  • 当应用程序触发使用API​​端点的Scrape时



这个Graph API端点只是一个调用:



POST /?id = {object-instance-id or object-url}& scrape = true



I know that once I publish a link to Facebook, a crawler will visit the link and gather information from the og meta tags and cache it. Using Facebooks debugger I can force a refresh of the cached information when I change the share image for example.

If I try to call a URL like https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fstackexchange.com programmatically or directly while not being logged in, a login page is returned.

Is there a resource or different link I can use to force a refresh of the content without doing it manually on a developer account?

解决方案

https://developers.facebook.com/docs/opengraph/using-objects/#update:

When an action is published, or a Like button pointing to the object clicked, Facebook will 'scrape' the HTML page of the object and read the meta tags. The object scrape also occurs when:

  • The object URL is input in the Object Debugger
  • Every 7 days after the first scrape
  • When an app triggers a scrape using an API endpoint

This Graph API endpoint is simply a call to:

POST /?id={object-instance-id or object-url}&scrape=true

这篇关于如何调试没有Facebook的URL linter的爬网/缓存链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆