AlwardL24 / SwiftYoutubeExtractor

A Swift package to extract format URLs for Youtube videos. Fully Swift implementation of a (very small) subset of youtube-dl's features.
MIT License
2 stars 0 forks source link

SwiftYoutubeExtractor

A Swift package to extract format URLs for Youtube videos. Fully Swift implementation of a (very small) subset of youtube-dl's features.

Installation

Install using the Swift Package Manager:

.package(
    url: "https://github.com/AlwardL24/SwiftYoutubeExtractor.git",
    .upToNextMajor(from: "1.0.0")
)

Or in Xcode, go to File -> Add Package Dependencies... and enter the URL:

https://github.com/AlwardL24/SwiftYoutubeExtractor.git

Usage

import SwiftYoutubeExtractor

let extractor = YoutubeExtractor()

Task {
    let formats = try await extractor.formats(for: "dQw4w9WgXcQ")

    print(formats)
}