Package Exports
- @brahmbeyond/instareel
- @brahmbeyond/instareel/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@brahmbeyond/instareel) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
instareel
This project allows you to download your Instagram Reels.It provide you downloadable link for your instagram Reel.
Totol Downlaods -
Support
If you find this package useful, please consider giving it a star on GitHub. This helps others discover it and encourages me to continue improving it.
I'm in learning process and open to all kind of feedbacks.
If you use this package in your project, I'd love to hear about it! Please tag me on Twitter or Instagram.
For updated information visit Github
npm page
https://www.npmjs.com/package/@brahmbeyond/instareel
Installation
npm i @brahmbeyond/instareel To install globally ↓
npm i -g @brahmbeyond/instareel Usage
→ CLI
insta get-reel <url of reel>example :
insta get-reel https://www.instagram.com/p/C3C2RnRA2dx/OR
reel get-reel <urls of reels seperated by spaces>example :
reel get-reel https://www.instagram.com/p/C3C2RnRA2dx/ https://www.instagram.com/p/C2ZE9tqLTQz/→ Code
- The agruments to the function should be array.
- The result returned is also a array.
const getInstagramReel = require('@brahmbeyond/instareel');
const instagramReelURLs = ['https://www.instagram.com/reel/CU6nIv4jRBH/','https://www.instagram.com/reel/CU6nIv4jRBH/'];
getInstagramReel(instagramReelURLs)
.then(downloadLinks => {
console.log('Download links:', downloadLinks);
})
.catch(error => {
console.error('Error:', error);
});Please note that the
getInstagramReelfunction is asynchronous, so we use.then()and.catch()to handle the Promise it returns. We can also useasync/awaitsyntax for a more synchronous style of handling Promises. Here's how you can do it:
async function main() {
const instagramReelURLs = ['https://www.instagram.com/reel/CU6nIv4jRBH/'];
try {
const links = await getInstagramReel(instagramReelURL);
console.log(links);
} catch (err) {
console.error(err);
}
}
main();
Helper
- If you want the JS code that can download the available array of links which you obtained from above, to your folder then you can use the code below.
Remember to install
AXIOS-npm i axios
const axios = require('axios');
const fs = require('fs');
const path = require('path');
async function downloadVideo(url, index) {
const response = await axios.get(url, { responseType: 'arraybuffer' });
fs.writeFileSync(path.join(__dirname, `video${index}.mp4`), response.data);
}
const video = ['link','link']; // Replace with your array of Video URLs that you got from the using the npm package
video.forEach((url, index) => {
downloadVideo(url, index);
});
OR
- you can use it in your HTML with
<a>tag which on clickin will download the video -
<a href="<Link_here>">Download Video</a>Todo
- human behaviour.
Contributing
Feedback and Contributions are always welcome!
Use Wisely
This is a third party library and not associated with Instagram. We're strictly against spam. You are liable for all the actions you take.
Demo Blog
https://brahm.code.blog/2024/02/21/introducing-instareel-your-ultimate-instagram-reel-downloader/