Created
December 31, 2025 12:05
-
-
Save ONLym22/48f53d01372ff59f0b9a545dbebfc87d to your computer and use it in GitHub Desktop.
Uploaded via ONLym Bot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //YouTube MP3 MP4 Downloader | |
| import axios from "axios" | |
| export async function meow(url) { | |
| const res = await axios.post( | |
| "https://www.meowtxt.com/api/video-info", | |
| { url }, | |
| { | |
| headers: { | |
| "Content-Type": "application/json", | |
| "User-Agent": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Mobile Safari/537.36", | |
| "Referer": "https://www.meowtxt.com/convert/yt-to-mp3" | |
| } | |
| } | |
| ) | |
| const d = res.data | |
| const formats = d.formats || [] | |
| const audio = formats.find(v => v.hasAudio && !v.hasVideo) || null | |
| const video = formats.find(v => v.hasAudio && v.hasVideo) || null | |
| return { | |
| status: 200, | |
| video_id: d.videoId || null, | |
| title: d.title || null, | |
| duration: d.duration || null, | |
| author: d.author || d.uploader || null, | |
| thumbnail: d.thumbnailUrl || null, | |
| views: d.viewCount || null, | |
| upload_date: d.uploadDate || null, | |
| description: d.description || null, | |
| audio_url: audio?.url || null, | |
| video_url: video?.url || null | |
| } | |
| } | |
| // Example Use | |
| meow("https://youtu.be/hz76_oCcOy4?si=xcOJFToTuwNIGPp4").then(console.log) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment