alt-art / genius-rs

Rust library that allows interact with Genius API
https://crates.io/crates/genius-rs
MIT License
7 stars 3 forks source link

get_lyrics function returning nothing #12

Closed GabriWar closed 2 years ago

GabriWar commented 2 years ago

code:

let lyrics = genius.get_lyrics("https://genius.com/Marty-robbins-big-iron-lyrics").await.unwrap();
    println!("{:#?}", lyrics);

result: []

maybe a i did something wrong? Using the code provided on the readme doesnt seems to help.

alt-art commented 2 years ago

As this method is done using web scraping, the web page can change many times.

The version that solves this is not in crates.io, but it may work on your package.toml file [dependencies] session:

genius-rs = { git = "https://github.com/alt-art/genius-rs", branch = "master"]

I'm sorry that I'm not working on this library anymore because I'm studying, in the future I'll give it the desired attention.

alt-art commented 2 years ago

Song struct as a property lyrics, but only can be used with a token with this permission, which if you are not employed by Genius, can only be obtained by reverse engineering.

GabriWar commented 2 years ago

dang, yeah, i was messing around with the API and it really sucks that you can't get the lyrics directly from it, thanks for the reply and the nice work, keep it up!

alt-art commented 2 years ago

Hey! I was able to solve the problem definitively if it is still interested, I am releasing version 0.5.0.