4.1.0 • Published 5 months ago

happy-dl v4.1.0

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

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.

4.1.0

5 months ago

4.0.0

5 months ago

3.0.3

5 months ago

3.0.2

5 months ago

3.0.1

5 months ago

3.0.0

5 months ago

2.0.8

5 months ago

2.0.7

6 months ago

2.0.6

6 months ago

2.0.5

6 months ago

2.0.4

6 months ago

2.0.3

6 months ago

2.0.2

6 months ago

2.0.1

6 months ago

2.0.0

6 months ago

1.1.1

6 months ago

1.1.0

6 months ago

1.0.12

6 months ago

1.0.11

7 months ago

1.0.10

7 months ago

1.0.9

7 months ago

1.0.8

7 months ago

1.0.7

7 months ago

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago