Skip to content

A simple tool to generate direct download links for media from Instagram, Facebook, Twitter, SnapChat, YouTube and TikTok! Just provide the post URL, and this package will return a direct download URL.

License

Notifications You must be signed in to change notification settings

ImHappyKumar/happy-dl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HAPPY DOWNLOADER (HAPPY DL)

NPM Info

GitHub stars npm total downloads npm version License

A simple tool to generate direct download links for media from Instagram, Facebook, Twitter, Snapchat, YouTube and TikTok! Just provide the post URL, and this package will return a direct download URL.

Installation

You can install happy-dl via npm:

npm install happy-dl

Or, if you're using Yarn:

yarn add happy-dl

Usage

Importing the Package

You can import the entire happy-dl module:

const happyDL = require("happy-dl");

Or destructure specific functions:

const {
  instagramDownloader,
  facebookDownloader,
  twitterDownloader,
  snapchatDownloader,
  youtubeDownloader,
  tiktokDownloader,
} = require("happy-dl");

Example Usage

Instagram Downloader

async function fetchInstagramData() {
  try {
    const result = await happyDL.instagramDownloader(
      "https://www.instagram.com/reel/C2xQMDBBY6v/"
    );
    console.log("Fetched Instagram media details:", result);
  } catch (error) {
    console.error("Error fetching Instagram media details:", error);
  }
}

fetchInstagramData();

Facebook Downloader

async function fetchFacebookData() {
  try {
    const result = await happyDL.facebookDownloader(
      "https://www.facebook.com/share/r/yfF9ZULaNJnQ72Ur/"
    );
    console.log("Fetched Facebook media details:", result);
  } catch (error) {
    console.error("Error fetching Facebook media details:", error);
  }
}

fetchFacebookData();

Twitter Downloader

async function fetchTwitterData() {
  try {
    const result = await happyDL.twitterDownloader(
      "https://x.com/ImHappyKumar/status/1758877530776547450"
    );
    console.log("Fetched Twitter media details:", result);
  } catch (error) {
    console.error("Error fetching Twitter media details:", error);
  }
}

fetchTwitterData();

Snapchat Downloader

async function fetchSnapchatData() {
  try {
    const result = await happyDL.snapchatDownloader(
      "https://snapchat.com/t/VHVlyNZX"
    );
    console.log("Fetched Snapchat media details:", result);
  } catch (error) {
    console.error("Error fetching Snapchat media details:", error);
  }
}

fetchSnapchatData();

YouTube Downloader

async function fetchYoutubeData() {
  try {
    const result = await happyDL.youtubeDownloader(
      "https://www.youtube.com/watch?v=j7asIBf1HcQ&ab_channel=SeekingOfHappiness"
    );
    console.log("Fetched YouTube media details:", result);
  } catch (error) {
    console.error("Error fetching YouTube media details:", error);
  }
}

fetchYoutubeData();

TikTok Downloader

async function fetchTiktokData() {
  try {
    const result = await happyDL.tiktokDownloader(
      "https://www.tiktok.com/@khaby.lame/video/7473945919407377686?lang=en"
    );
    console.log("Fetched TikTok media details:", result);
  } catch (error) {
    console.error("Error fetching TikTok media details:", error);
  }
}

fetchTiktokData();

Supported Platforms

  • Instagram
  • Facebook
  • Twitter
  • Snapchat
  • YouTube
  • TikTok
  • More coming soon!

Contributing

Contributions are welcome! If you find any issues or want to contribute new features, feel free to fork the repository and create a pull request.

Steps to Contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes and commit them (git commit -am 'Add new feature').
  4. Push to the branch (git push origin feature-branch).
  5. Create a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A simple tool to generate direct download links for media from Instagram, Facebook, Twitter, SnapChat, YouTube and TikTok! Just provide the post URL, and this package will return a direct download URL.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published