vocalolyrics 0.1.0

Lyrics scraper, primarily for Vocaloid content. By default, atwiki is used as the source. We plan to make other sources selectable, but that is not currently possible.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
mod search_page;
mod song_page;

pub async fn get_vocaloid_lyrics(title: &str) -> Result<Vec<String>, Box<dyn std::error::Error>> {
	let url = search_page::parser::search_song_url_in_atwiki(title).await?;
	let lyrics = song_page::scraper::parse_song_atwiki(&url).await?;
	Ok(lyrics)
}

#[tokio::test]
async fn test_get_vocaloid_lyrics() {
	let title = "ageha";
	let lyrics = get_vocaloid_lyrics(title).await;
	dbg!(&lyrics);
	assert!(lyrics.is_ok());
}