happy-dl
v1.0.12
Published
A package to download media from social platforms like Instagram, Facebook, Twitter, etc.
Downloads
910
Maintainers
Readme
HAPPY DOWNLOADER (HAPPY DL)
A simple tool to generate direct download links for media from Instagram, Facebook, and Twitter! 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,
} = 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();
Supported Platforms
- 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:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes and commit them (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a pull request.
License
This project is licensed under the MIT License - see the LICENSE file for details.