last.fm

Request user recenttracks from lastfm with codeigniter and xmlrpc

☆樱花仙子☆ 提交于 2020-01-03 05:07:12
问题 I'm trying to get some information from last.fm with Codeigniter. $this->load->library("xmlrpc"); $this->xmlrpc->server("http://ws.audioscrobbler.com/2.0/", 80); $this->xmlrpc->method("user.getrecenttracks"); $request = array("rj", "b25b959554ed76058ac220b7b2e0a026"); $this->xmlrpc->request($request); if(!$this->xmlrpc->send_request()) { echo $this->xmlrpc->display_error(); } The only response I always get is: Invalid parameters - Your request is missing a required parameter It tried some

Request user recenttracks from lastfm with codeigniter and xmlrpc

时光怂恿深爱的人放手 提交于 2020-01-03 05:07:04
问题 I'm trying to get some information from last.fm with Codeigniter. $this->load->library("xmlrpc"); $this->xmlrpc->server("http://ws.audioscrobbler.com/2.0/", 80); $this->xmlrpc->method("user.getrecenttracks"); $request = array("rj", "b25b959554ed76058ac220b7b2e0a026"); $this->xmlrpc->request($request); if(!$this->xmlrpc->send_request()) { echo $this->xmlrpc->display_error(); } The only response I always get is: Invalid parameters - Your request is missing a required parameter It tried some

How to retrieve multiple JSON objects with a for loop in javascript

ぃ、小莉子 提交于 2019-12-25 07:29:34
问题 I've been playing around with the Last.fm API and JSON and I've been trying to retrieve a user's top artists by month for the past 12 months. I tried to set up a for loop to go through each month and then pull the relevant JSON data corresponding to that month, but from what I can tell it seems like the for loop is being run through much quicker than the JSON call. I'm using Felix Bruns' last.fm javascript API https://github.com/fxb/javascript-last.fm-api I checked the console and no values

Python Not Importing

狂风中的少年 提交于 2019-12-25 00:34:00
问题 So i downloaded the lastfm api for python made by people. found here: http://code.google.com/p/python-lastfm/ I have a website hosting through dreamhost. I wasnt able to build the module using: python setup.py build in my shell that i used putty to get into. But when i would run python setup.py install it would return an error. Figuring that all install really does is throw the files from the lib dir into the python site-packages folder, i decided to try and manually do it. I was successful

Last.fm java API - how to get users from PaginatedResult

余生颓废 提交于 2019-12-24 11:36:49
问题 I am a but puzzled about the lastfm API, more exactly about the PaginatedResult I read all users from a group in a PaginatedResult: PaginatedResult<de.umass.lastfm.User> users = Group.getMembers("Classic Rock", key); Then I tried two methods to display all the users. There should be about 25000, but I only get about 25. Only first page? How could I get all the results? // for (int i = 0; i < users.getTotalPages();i++){ for (User thisuser: users.getPageResults()){ //for each user System.out

Get large artist image from last.fm xml (api artist.getinfo)

本秂侑毒 提交于 2019-12-23 05:26:49
问题 This is the xml response from last fm: <lfm status="ok"> <artist> <name>Adele</name> <mbid>1de93a63-3a9f-443a-ba8a-a43b5fe0121e</mbid> <url>http://www.last.fm/music/Adele</url> <image size="small">http://userserve-ak.last.fm/serve/34/71796928.png</image> <image size="medium">http://userserve-ak.last.fm/serve/64/71796928.png</image> <image size="large">http://userserve-ak.last.fm/serve/126/71796928.png</image> <image size="extralarge">http://userserve-ak.last.fm/serve/252/71796928.png</image>

XML parsing in java with xpath

人走茶凉 提交于 2019-12-18 09:48:46
问题 I am trying to print out some data so my code is private static final DocumentBuilderFactory DOCUMENT_BUILDER_FACTORY = DocumentBuilderFactory.newInstance(); private static final XPathFactory XPATH_FACTORY = XPathFactory.newInstance(); public void parseXml(String urlPath) throws Exception { URL url = new URL(urlPath); URLConnection connection = url.openConnection(); DocumentBuilder db = DOCUMENT_BUILDER_FACTORY.newDocumentBuilder(); final Document document = db.parse(connection.getInputStream

ElementTree findall() returning empty list

▼魔方 西西 提交于 2019-12-17 16:18:40
问题 I am trying to write a small script for interacting with the last.fm API. I have a small bit of experience working with ElementTree , but the way I used it previously doesn't seem to be working, it instead returns an empty list. I removed the API key as I don't know exactly how private it should be, and gave an example of the XML I am receiving in it's place. Class for interacting with API: from xml.etree import ElementTree import urllib import urllib2 class Last_fmWrapper(object): def __init

What is a striping error?

无人久伴 提交于 2019-12-13 15:52:29
问题 I'm trying to convert last.fm xml data into rdf using xslt and am getting this error: ERROR [http-8080-1] (RDFDefaultErrorHandler.java:40) - (line 3 column 24): {E202} Expecting XML start or end element(s). String data "Joseph Arthur" not allowed. Maybe a striping error. Can anyone explain to me what a striping error is, or in general what I'm doing wrong. The xslt code is here: <xsl:for-each select="/lfm/artists/artist"> <lfm:name><xsl:value-of select="name"/></lfm:name> </xsl:for-each> Here

Watcher not firing when contents of object changes

怎甘沉沦 提交于 2019-12-12 19:40:28
问题 Why is my $interval visibly refreshing the model? I'm trying to automatically update the song that I'm playing right now and showing it on my website. For that, I used the $interval function. The problem is that the model (div) is refreshing every 10 seconds, while I want it only to refresh when the song changes (and just checking every 10 seconds) I tried changing the $interval function with setInterval(), but no luck. angular.module('lastfm-nowplaying', []) .directive('lastfmnowplaying', [