Mika Scraper / ytdl
Function: ytdl()
ytdl(
youtubeUrl
):Promise
<ScrapeResult
>
Defined in: src/youtube/ytdl.ts:72
Extracts downloadable media formats and associated metadata from a provided YouTube video using the ssyoutube.rip
backend service.
Parameters
youtubeUrl
- Type:
string
- Description: The complete URL of the YouTube video from which to extract media and metadata.
Returns
- Type:
Promise
<ScrapeResult
> - Description: Resolves to an object that contains metadata and download links for available media formats. If the extraction fails, the promise will be rejected.
Example
const youtubeLink: string = "https://www.youtube.com/watch?v=dQw4w9WgXcQ";
ytdl(youtubeLink)
.then((result) => {
console.log("Download options:", result);
})
.catch((error) => {
console.error("Error fetching data:", error);
});
Last updated on