Hello So i am doing a project about music player.And i added a feature that there is a browser that will redirect to that song's lyric when the music player changes song.
But there is a problem,i am using google's im feeling lucky api
(http://google.com/search?sourceid=navclient&btnI=1&q=) ,and this is my code (I am using visual basic):
Private Sub Player_CurrentItemChange(sender As Object, e As AxWMPLib._WMPOCXEvents_CurrentItemChangeEvent) Handles Player.CurrentItemChange If My.Settings.lyricenable = True Then Dim Artist As String = Player.Ctlcontrols.currentItem.getItemInfo("Artist") Dim Title As String = Player.Ctlcontrols.currentItem.getItemInfo("Title") lyricsbrowser.Navigate("http://google.com/search?sourceid=navclient&btnI=1&q=" + Title + "+" + Artist + "+Lyrics") End If End Sub
(lyricenable is a setting where the user can enable auto lyric finding or disbale it)
So i run the program, and i found that some of them worked (For example
http://google.com/search?sourceid=navclient&btnI=1&q=Pompeii+Bastille+lyrics, this goes to http://www.azlyrics.com/lyrics/bastille/pompeii.html)
But some of them showed google's all the search result (For example https://www.google.fr/search?sourceid=navclient&btnI=1&q=Problem+Pentatonix+Lyrics)
Where is the problem? I am newbie in VB so i know just these. Tell me if there are better ways. Thank you!
(Sorry but stackoverfow only allow me to have 2 link so i block quoted some link)