Skip to content

Commit

Permalink
media-detector: ignore /media/ in WSJ articles
Browse files Browse the repository at this point in the history
  • Loading branch information
iparamonau authored and nleush committed Jul 9, 2024
1 parent a5d7c38 commit f0c7d1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/meta/media-detector.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f0c7d1c

Please sign in to comment.