Compare commits
2 commits
1028d420ce
...
d84cab81bf
| Author | SHA1 | Date | |
|---|---|---|---|
|
d84cab81bf |
|||
|
c419b1d353 |
1 changed files with 6 additions and 0 deletions
|
|
@ -908,6 +908,7 @@ async function instagram(msg, url, spoiler = false, minimal = false, command = f
|
||||||
for (const key of cleanUrl.searchParams.keys()) {
|
for (const key of cleanUrl.searchParams.keys()) {
|
||||||
cleanUrl.searchParams.delete(key);
|
cleanUrl.searchParams.delete(key);
|
||||||
}
|
}
|
||||||
|
cleanUrl.hostname = "instagram.com";
|
||||||
|
|
||||||
const [_, _route, postId] = urlObj.pathname.match(/\/(p|reel)\/([a-zA-Z0-9\-_]+)/);
|
const [_, _route, postId] = urlObj.pathname.match(/\/(p|reel)\/([a-zA-Z0-9\-_]+)/);
|
||||||
if (!postId) return {};
|
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;
|
let content = post.edge_media_to_caption.edges[0].node.text;
|
||||||
content = content.replaceAll("`", "\u02cb").replaceAll("*", "\u2217").replaceAll("||", "|\u200b|");
|
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 isVerified = post.owner.is_verified;
|
||||||
const verified = isVerified ? ` ${Icons.fedimbed.verified.Instagram}` : "";
|
const verified = isVerified ? ` ${Icons.fedimbed.verified.Instagram}` : "";
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue