5.6.5 • Published 10 months ago

reelflow v5.6.5

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

🎬 reelflow

Elegant and powerful Instagram reels downloader for seamless content extraction.

Note: This library is specifically designed for Instagram Reels. It does not support Stories or Posts.

npm version License: MIT TypeScript Instagram

🚀 Simple Usage

ESM (TypeScript/JavaScript)

// ESM - TypeScript/JavaScript
import { getVideoInfo } from 'reelflow';

async function downloadReel() {
  try {
    const url = 'https://www.instagram.com/reels/CxKp7';
    const video = await getVideoInfo(url);
    console.log(video.videoUrl); // Direct download URL
  } catch (error) {
    console.error('Failed:', error instanceof Error ? error.message : String(error));
  }
}

downloadReel();

CommonJS

// CommonJS
const { getVideoInfo } = require('reelflow');  // Will automatically use the CJS version

async function downloadReel() {
  try {
    const url = 'https://www.instagram.com/reels/CxKp7';
    const video = await getVideoInfo(url);
    console.log(video.videoUrl);
  } catch (error) {
    console.error('Failed:', error.message);
  }
}

downloadReel();

✨ Features

  • 🚀 Lightning-fast video downloads
  • 📝 Full TypeScript support
  • 🛡️ Robust error handling
  • 🔑 No API key required

📦 Installation

npm install reelflow

📖 Documentation

import { getVideoInfo, ReelflowError } from 'reelflow';

async function downloadVideo(url: string) {
  try {
    const video = await getVideoInfo(url);
    console.log('URL:', video.videoUrl);
    console.log('Size:', `${video.width}x${video.height}`);
    return video;
  } catch (error) {
    if (error instanceof ReelflowError) {
      console.error(`Failed (${error.status}):`, error.message);
      throw error;
    }
    console.error('Unexpected error:', error instanceof Error ? error.message : String(error));
    throw new ReelflowError('Unexpected error occurred', 500);
  }
}

// Use it
const reelUrl = 'https://www.instagram.com/reels/CxKp7';
downloadVideo(reelUrl).catch(console.error);
import { getVideoInfo, ReelflowError } from 'reelflow';

async function handleReelDownload() {
  try {
    const url = 'https://www.instagram.com/reel/CxKp7';
    const video = await getVideoInfo(url);
    return video;
  } catch (error) {
    if (error instanceof ReelflowError) {
      switch (error.status) {
        case 400: console.error('Invalid URL format'); break;
        case 401: console.error('Video is not accessible'); break;
        case 404: console.error('Video not found'); break;
        default: console.error(`Error ${error.status}:`, error.message);
      }
      throw error;
    }
    console.error('Unexpected error:', error instanceof Error ? error.message : String(error));
    throw new ReelflowError('Unexpected error occurred', 500);
  }
}

handleReelDownload().catch(console.error);

📞 Support

📄 License

MIT © Hossein Pira


Made with ❤️ by Hossein Pira

5.6.5

10 months ago

5.6.0

10 months ago

5.5.0

10 months ago

5.3.0

10 months ago

5.2.0

10 months ago

5.1.0

10 months ago

5.0.0

10 months ago

4.9.0

10 months ago

4.8.0

10 months ago

4.7.0

10 months ago

4.6.0

10 months ago

4.5.0

10 months ago

4.4.0

10 months ago

4.3.0

10 months ago

4.2.0

10 months ago

4.1.0

10 months ago

4.0.0

10 months ago

3.9.0

10 months ago

3.8.0

10 months ago

3.7.0

10 months ago

3.6.0

10 months ago

3.5.0

10 months ago

3.4.0

10 months ago

3.3.0

10 months ago

3.2.0

10 months ago

3.1.0

10 months ago

3.0.0

10 months ago

2.9.0

10 months ago

2.8.0

10 months ago

2.7.0

10 months ago

2.6.0

10 months ago

2.5.0

10 months ago

2.4.0

10 months ago

2.3.0

10 months ago

2.1.0

10 months ago

2.0.0

10 months ago

1.9.0

10 months ago

1.8.0

10 months ago

1.7.0

10 months ago

1.6.0

10 months ago

1.5.0

10 months ago

1.4.0

10 months ago

1.3.0

10 months ago

1.2.0

10 months ago

1.1.0

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago