In my android application, when I try to parse the spotify web api, the page return a 404. The URL seems ok to me (http://ws.spotify.com/search/1/album.xml?q=album:'Meteora'+artist:'Linkin Park'), but returns 404.
Here is my code :
url = new URL("http://ws.spotify.com/search/1/album.xml?q=album:'" + albumName + "'+artist:'" +artistName +"'");
urlc = url.openConnection();
urlc.addRequestProperty("User-Agent", userAgent);
Log.v(TAG_SPOTIFY, "User-agent set: " + userAgent);
return this.parseSpotifyURI(urlc.getInputStream());
Here is the error :
06-20 16:51:00.846: W/System.err(4962): java.io.FileNotFoundException: http://ws.spotify.com/search/1/album.xml?q=album:'Meteora'+artist:'Linkin Park'
06-20 16:51:00.846: W/System.err(4962): at libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:177)
06-20 16:51:00.846: W/System.err(4962): at com.micky.scanthings.music.ParseMusic.getSpotifyURI(ParseMusic.java:489)
...