]+)>([^<>]+)<\/a>/);
- author = author ? author[1]: oembed.author_name;
-
- var title = oembed.html.match(/>([^<>]+)<\/a>/i);
- title = title ? title[1] : author;
-
- return {
- title: title ? entities.decodeHTML(title) : oembed.title,
- description: description ? entities.decodeHTML(description) : oembed.description,
- author: author
- };
+ getMeta: function(__allowFBThumbnail, meta) {
+ return {
+ title: meta.twitter?.title || meta.og?.title,
+ description: meta.twitter?.description || meta.og?.description,
+ canonical: meta.og?.url
}
},
diff --git a/plugins/domains/instagram.com/instagram.com.js b/plugins/domains/instagram.com/instagram.com.js
index 80936355b..06a05d35f 100644
--- a/plugins/domains/instagram.com/instagram.com.js
+++ b/plugins/domains/instagram.com/instagram.com.js
@@ -1,7 +1,3 @@
-import cheerio from 'cheerio';
-
-import { decodeHTML5 } from 'entities';
-
export default {
/**
@@ -29,37 +25,10 @@ export default {
provides: ['ipOG', '__allowInstagramMeta'],
getMeta: function (oembed, urlMatch, ipOG) {
-
- var title = ipOG.title;
- var description = ipOG.description || oembed.title;
-
- if (!description || !title || /login/i.test(title)) {
- var $container = cheerio('
');
- try {
- $container.html(decodeHTML5(oembed.html));
- } catch (ex) {}
-
- if (!title || /login/i.test(title)) {
- var $a = $container.find(`p a[href*="${oembed.author_name}"], p a[href*="${urlMatch[1]}"]`);
-
- if ($a.length == 1) {
- title = $a.text();
- title += /@/.test(title) ? '' : (oembed.author_name ? ` (@${oembed.author_name})` : '');
- } else if (oembed.author_name) {
- title = `Instagram (@${oembed.author_name})`;
- }
- }
-
- if (!description) {
- var $a = $container.find(`p a[href*="${urlMatch[1]}"]`);
- description = $a.text();
- }
- }
-
return {
- title: title,
- description: description,
- canonical: `https://www.instagram.com/p/${urlMatch[1]}`
+ title: ipOG.title,
+ description: ipOG.description,
+ canonical: ipOG.url || `https://www.instagram.com/p/${urlMatch[1]}`
}
},
@@ -90,7 +59,7 @@ export default {
// Remove below error when and if it's fixed. Validators will remove the link
og_image.error = 'Unfortunatelly Instagram\'s OG image is cropped';
} else if (!oembed.thumbnail_url) {
- og_image.message = "Unfortunatelly, Instagram removed full images on October 1, 2025";
+ og_image.message = "Unfortunatelly, Instagram removed full images on November 3, 2025";
}
links.push(og_image);
}