diff --git a/src/modules/fedimbed.js b/src/modules/fedimbed.js index 32592d3..d4dc5a4 100644 --- a/src/modules/fedimbed.js +++ b/src/modules/fedimbed.js @@ -908,6 +908,7 @@ async function instagram(msg, url, spoiler = false, minimal = false, command = f for (const key of cleanUrl.searchParams.keys()) { cleanUrl.searchParams.delete(key); } + cleanUrl.hostname = "instagram.com"; const [_, _route, postId] = urlObj.pathname.match(/\/(p|reel)\/([a-zA-Z0-9\-_]+)/); if (!postId) return {}; @@ -1000,6 +1001,11 @@ async function instagram(msg, url, spoiler = false, minimal = false, command = f let content = post.edge_media_to_caption.edges[0].node.text; content = content.replaceAll("`", "\u02cb").replaceAll("*", "\u2217").replaceAll("||", "|\u200b|"); + const song = post.clips_music_attribution_info; + if (song != null) { + content = `-# :musical_note: ${song.artist_name} - ${song.song_name}\n${content}`; + } + const isVerified = post.owner.is_verified; const verified = isVerified ? ` ${Icons.fedimbed.verified.Instagram}` : "";