From f0c7d1c2ce2633632645113e314ff4cdba340544 Mon Sep 17 00:00:00 2001 From: Ivan Paramonau Date: Tue, 9 Jul 2024 16:09:45 -0400 Subject: [PATCH 1/3] media-detector: ignore /media/ in WSJ articles --- plugins/meta/media-detector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/meta/media-detector.js b/plugins/meta/media-detector.js index 25d502f0f..69c9a39f2 100644 --- a/plugins/meta/media-detector.js +++ b/plugins/meta/media-detector.js @@ -22,7 +22,7 @@ export default { var has_thumbnail = (meta.og && meta.og.image) || (meta.twitter && meta.twitter.image); if (has_thumbnail && meta.og - && !/\/(?:videos?|media|player|embed)\//i.test(url) && !/https?:\/\/videos?\./i.test(url) + && !/\/(?:videos?|player|embed)\//i.test(url) && !/https?:\/\/videos?\./i.test(url) && (/article|blog|news|post|noticia/i.test(url) || (/\/(\d{4})\/(\d{2})\/(\d{2})/).test(url) || /article|post/i.test(meta.og.type) && (!meta.ld || meta.article) From 6b317d6f7c051fd1804101e9dc6208573fcf98c0 Mon Sep 17 00:00:00 2001 From: Ivan Paramonau Date: Thu, 11 Jul 2024 19:40:41 -0400 Subject: [PATCH 2/3] domains: fix title for Spotify audiobooks --- plugins/domains/spotify.com.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/plugins/domains/spotify.com.js b/plugins/domains/spotify.com.js index 7e3e406ba..415705c8c 100644 --- a/plugins/domains/spotify.com.js +++ b/plugins/domains/spotify.com.js @@ -14,13 +14,14 @@ export default { getMeta: function(meta) { return { - date: meta.music && meta.music.release_date, - author: meta.twitter && meta.twitter.audio && meta.twitter.audio.artist_name, - author_url: meta.music && meta.music.musician, - duration: meta.music && meta.music.duration, - description: meta.og && meta.og.description, - canonical: meta.og && meta.og.url, - site: meta.og && meta.og.site_name || 'Spotify' + title: meta.og?.title || meta.twitter?.title, //oembed.title is subpar for audiobooks + date: meta.music?.release_date, + author: meta.twitter?.audio?.artist_name, + author_url: meta.music?.musician, + duration: meta.music?.duration, + description: meta.og?.description || meta.twitter?.description, + canonical: meta.og?.url, + site: meta.og?.site_name || 'Spotify' } }, From a2532734b8729842505de25af252ca04be4fc4f3 Mon Sep 17 00:00:00 2001 From: Ivan Paramonau Date: Thu, 11 Jul 2024 21:14:19 -0400 Subject: [PATCH 3/3] tests: fix Spotify --- plugins/domains/spotify.com.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/domains/spotify.com.js b/plugins/domains/spotify.com.js index 415705c8c..52f4db933 100644 --- a/plugins/domains/spotify.com.js +++ b/plugins/domains/spotify.com.js @@ -96,7 +96,7 @@ export default { } }, - tests: [{noFeeds: true}, {skipMethods: ["getData"], skipMixins: ["oembed-iframe", "oembed-thumbnail", "og-image"]}, + tests: [{noFeeds: true}, {skipMethods: ["getData"], skipMixins: ["oembed-iframe", "oembed-thumbnail", "og-image", "oembed-title"]}, "https://open.spotify.com/playlist/44CgBWWr6nlpy7bdZS8ZmN", "http://open.spotify.com/track/6ol4ZSifr7r3Lb2a9L5ZAB", "https://open.spotify.com/playlist/4SsKyjaGlrHJbRCQwpeUsz",