Are you URL-escaping your artist and title?
For debugging purposes, you might want to build the url in a string before the call, and print it to see if it's coming out like you intended.
Plus then if you have a specific URL that's not working, you can report it here and we can check it.