Skip to content

Commit

Permalink
Improve artist extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
devoxin committed May 12, 2024
1 parent 7044865 commit af27d5e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ private AudioItem loadSearch(String query) {

private AudioTrack extractHtmlTrack(Element e) {
String title = e.select(".heading a").text();
String artist = e.select(".subhead").text().split(",")[0].replace("by", "").trim();
String[] artists = e.select(".subhead").text().split("by");
String artist = artists[artists.length - 1].split(",")[0].trim();
String trackUrl = e.select(".itemurl a").text();

int queryIndex = trackUrl.indexOf("?");
Expand Down

0 comments on commit af27d5e

Please sign in to comment.