You can use a Link preview API service - [1]: https://www.linkpreview.net/
Try this code .
$.ajax({
url: "https://api.linkpreview.net",
dataType: 'jsonp',
data: {q: "message URL", key: 'your API key'},
success: function (response) {
let data=response;
console.log(data);
}
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…