musicou-kit

Crates.iomusicou-kit
lib.rsmusicou-kit
version0.1.2
sourcesrc
created_at2023-07-20 21:47:56.359286
updated_at2023-08-30 07:45:35.722076
descriptionAn unofficial API wrapper for music streaming sites like Youtube Music, Soundcloud and Bandcamp
homepage
repository
max_upload_size
id921792
size93,340
wind (windpressure)

documentation

README

musicou-kit

Musicou-kit is an API wrapper for Youtube Music, SoundCloud and Bandcamp. It's fairly straight forward to use and easy to implement into other applications.

Current state

This crate is still experimental & WIP and will significantly change in the future. It has very messy code and some bugs and only support one(1) platform for now..

Examples

Search with a query and get the first artist and fetch its data.

#[tokio::main]
async fn main() {
    env_logger::init(); // logs stuff
    // crating search with query and defining platform
    let mut search = Search::new("the weeknd" structs::Platform::Youtube)
        .fetch(structs::Page::Artist) // fetching a certain page
        .await;

    // fetching all data for first artist in search results
    print!(" {:?}, ", search.unwrap().artists.unwrap()[0].fetch().await)
    // Ok(Artist { id: "UClYV6hHlupm_S_ObS1W-DYw", name: "The Weeknd", platform: Youtube, thumbnails: [Thumbnail { url: ".....", width: 540, height: 225 }], background: [], incomplete: true, followers: 33000000 }
}

Getting song data from id

#[tokio::main]
async fn main() {
    env_logger::init(); // logs stuff
    let song = Song::from_id("diW6jXhLE0E").fetch().await;
    println!("{:?}", song.unwrap());
    // Song { id: "", title: "The Weeknd - Party Monster (Official Video)", length: 258, author: Artist { id: "", name: "", platform: Youtube, thumbnails: [], background: [], incomplete: true, followers: 0, private_field: "" }, thumbnails: [Thumbnail { url: "https://i.ytimg.com/.....", width: 400, height: 225 } ... ], view_count: 154341745, streams: Some([Stream { url: "https://rr3---....", bitrate: "130477", mime_type: "audio/mp4; codecs="mp4a.40.2" } ]), album: None, type_of: Youtube, incomplete: false}
}

Roadmap

  • Youtube scraping / extracting

    • Stream extraction
    • Music
    • Search
      • Songs
      • Albums
      • Playlists
      • Artists
    • Albums
    • Artist
    • Playlist
  • Soundcloud scraping

    • Stream extraction
    • Direct music lookup
    • Searh
    • Albums
    • Artist
    • Playlist
  • Bandcamp scraping

    • Stream extraction
    • Direct music lookup
    • Search
    • Albums
    • Artist
    • Playlist

Thanks <3!

Youtube internal api research

Commit count: 0

cargo fmt