diff --git a/lib/routes/instagram/index.js b/lib/routes/instagram/index.js index 504a1f611..0874214b9 100644 --- a/lib/routes/instagram/index.js +++ b/lib/routes/instagram/index.js @@ -55,7 +55,7 @@ module.exports = async (ctx) => { logo = userInfo.hd_profile_pic_url_info.url; const fullName = userInfo.full_name; title = `${fullName} (@${username}) - Instagram`; - link = path.join('https://www.instagram.com', username); + link = `https://www.instagram.com/${username}`; itemsRaw = await ig.feed.user(id).items(); break; @@ -64,7 +64,7 @@ module.exports = async (ctx) => { const tag = nameOrId; title = `#${tag}) - Instagram`; - link = path.join('https://www.instagram.com', 'explore', 'tags', tag); + link = `https://www.instagram.com/explore/tags/${tag}`; itemsRaw = await (await ig.feed.tags(tag).items()).slice(1); // the 0 item is undefined for unknown reason break; @@ -89,7 +89,7 @@ module.exports = async (ctx) => { } // Metadata - const url = path.join('https://www.instagram.com', 'p', item.code); + const url = `https://www.instagram.com/p/${item.code}`; const pubDate = new Date(item.taken_at * 1000).toUTCString(); const title = summary.split('\n')[0];