last.fm

How can I read breaks in downloaded text?

ぐ巨炮叔叔 提交于 2019-12-12 12:15:42
问题 I'm using the Last.fm Java library that's listed in the "Downloads" section on the API. When I call "getWikiText()" and set it to my TextView, all the data is returned; however, the html isn't formatted correctly. Rather than showing separate paragraphs, the data is shown as one large text. To illustrate what I mean, here is a picture of what is being returned and then a link to the artist page of how things should look. Picture - http://i.imgur.com/ameTO.jpg How things should look - http:/

get from this line <topalbums artist=“Adele”>

≡放荡痞女 提交于 2019-12-12 02:32:27
问题 Hello guys im trying to get info from last.fm, i'm getting albums names and etc, but i want to get from line 2. how to get it? <topalbums artist="Adele" page="1" perPage="1" totalPages="55092" total="55092"> ^from here name, page, perpage and totalpages <lfm status="ok"> <topalbums artist="Adele" page="1" perPage="1" totalPages="55092" total="55092"> <album> <name>21</name> <playcount>52308837</playcount> <mbid>c45e0e0e-48c9-4441-aac3-2f2b34202d3c</mbid> <url>https://www.last.fm/music/Adele

Why toString() returns an hexadecimal code?

对着背影说爱祢 提交于 2019-12-11 14:12:09
问题 I have this written in my app LastFmServer server = AndroidLastFmServerFactory.getServer(); Artist[] results; results = server.searchForArtist("Hatebreed"); Log.e("", results[2].toString()); Why does this code make this appear in logcat? fm.last.api.Artist@2bf03488 回答1: It's because that class doesn't implement its own toString, so you end up calling the one inherited from java.lang.Object that gives you the class name and its hash. 来源: https://stackoverflow.com/questions/11924018/why

last.fm API pagination

五迷三道 提交于 2019-12-11 13:53:32
问题 I'm creating a last.fm/ google maps mashup, plotting gig map markers for whatever city you search for. A last.fm API response is like this: <events location="New York" page="1" totalpages="105" total="1050"> <event> <id>640418</id> <title>Nikka Costa</title> <artists> etc. Currently, you can search for Edinburgh, for example - and it will bring back the first 10 gigs coming soon. I'm using PHP and simple XML to return the results. I want to add pagination - so first 10 gigs would be page 1; I

How do I implement last.fm api as a search engine in java eclipse?

旧城冷巷雨未停 提交于 2019-12-11 09:51:25
问题 I'm not sure how to word this correctly, but I'd like to use this code and some others to be able to search up song results and then display its info when I select it. I've also implemented the last.fm api into my eclipse, but I am not sure where to go from there. Any advice would help. Thanks! static final ItemFactory<Track> FACTORY = new TrackFactory(); public static final String ARTIST_PAGE = "artistpage"; public static final String ALBUM_PAGE = "albumpage"; public static final String

Google Map Infowindow Closure?

跟風遠走 提交于 2019-12-11 07:14:56
问题 as part of my last.fm/google maps event mashup, I have to plot markers dynamically from last.fm API onto the google map. This is all well but when I click the marker, only the last infowindow (for one gig) is displayed. I know the reasoning for this but struggle to implement it. Currently I'm running a PHP loop through all the dynamic gig's locations (co-ordinates) and then passing this to the javascript. This makes more sense to me - and my knowledge of PHP is much better than JS: <?php

PHP exec python not working

吃可爱长大的小学妹 提交于 2019-12-10 21:33:33
问题 hey yall. Im running python on a webserver from dreamhost. I am using their install of python and am using a lastfm module that can be found here: http://code.google.com/p/python-lastfm/ to get it to import properly i do this import sys sys.path.append("/home/myusername/build/Python-2.5/Lib/site-packages/") import lastfm since the lastfm module is installed there. When I use putty to ssh into my server, i can simply run python test.py and it works perfectly. But when i run it from a php

Converting Straight JS to JQuery

╄→尐↘猪︶ㄣ 提交于 2019-12-10 19:05:28
问题 Im trying to append some JSON data from the last.fm API, I have been using alert() at several stages to verify the API is being parsed correctly and it is, This has led me to the conclusion that getElementById().appendChild() doesn't work, below is the URL to the test page I have set up: http://mutant-tractor.com/tabtest.html So moving from this straight JS to JQuery I have been advised is the best way to go, That said I have NO clue about anything JQuery and my JS knowledge is based on some

PHP and Last.fm API

隐身守侯 提交于 2019-12-10 12:09:10
问题 I have a JSON structure such as http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist=Cher&api_key=XXXX&format=json and I'd like to pick out various bits of information such as similar artists (names and images), tags, the extralarge image, content etc I got the similar arists working by using <?php $url = 'http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist=Queens%20Of%20the%20STone%20Age&api_key=XXX&format=json'; $content = file_get_contents($url); $json = json_decode(

DOMDocument load on a page returning 400 Bad Request status

十年热恋 提交于 2019-12-08 14:09:21
问题 I'm trying to use the Last.fm API for an application I'm creating, but am having some problems with validation. If an API request gives an error it returns a code and message in the response XML like this: <lfm status="failed"> <error code="6">No user with that name</error> </lfm> However, the request also returns an HTTP status of 400 (or in some cases 403) which DOMDocument considers an error and so then refuses to parse the XML. Is there any way round this, so that I can retrieve the error