如何从 url(如 Discord)中获取丰富的内容?

How get rich content from an url (like Discord)?

如何从 url(例如 Discord)获取一些页面信息,如标题、描述、缩略图等?

我想在 php 或 javascript 中进行。

它是协议、api 还是其他什么?

示例:

对于PHP,使用https://github.com/oscarotero/Embed

PHP library to get information from any web page (using oembed, opengraph, twitter-cards, scraping the html, etc). It's compatible with any web service (youtube, vimeo, flickr, instagram, etc) and has adapters to some sites like (archive.org, github, facebook, etc).