I am using the zend framework to get info from the audioscrobbler api. The response format is like this:
<recenttracks user="RJ">
<track nowplaying="true">
<artist mbid="2f9ecbed-27be-40e6-abca-6de49d50299e">Aretha Franklin</artist>
<name>Sisters Are Doing It For Themselves</name>
<mbid/>
<album mbid=""/>
<url>ww...
I'm trying to parse the Last.fm feed of my last 10 tracks played onto my website.
This is what I have so far,
<?php
$doc = new DOMDocument();
$doc->load('http://ws.audioscrobbler.com/1.0/user/nathanjmassey/recenttracks.xml');
$arrFeeds = array();
foreach ($doc->getElementsByTagName('track') as $node) {
$itemRSS = array (
'...
I'm using the Last.fm API and I stuck on something seemingly fairly simple.
One of the responses is the duration. Which is returned as:
222000
But how do I format (in PHP) this to look like
MIN:SEC
3:42
...
Hi. I'm fetching lots of user data via last.fm's API for my mashup. I do this every week as I have to collect listening data.
I fetch the data through their REST API and XML: more specifically simplexml_load_file().
The script is taking ridiculously long. For about 2 300 users, the script takes 30min to fetch only the names of artists....
When using the REST interface for Last.fm web service, are the "Etag" and/or "Last-Modified" HTTP headers provided in the responses?
E.g. let's say I plan on using the track.getTags API method, is either "Etag" / "Last-Modified" HTTP header sent along with the response?
(NOTE: I have asked the same question on Last.fm's "discussion boa...
I am trying to customize this script so that instead of a user's recent tracks it will display a user's favourite artists.
This is what I have come up with, however it doesn't work whatsoever. I thought it would be easy changing the attributes of the feed, but obviously not...
(function($){
$.fn.lastFM = function(options) {
var defaul...
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 w...
Hi folks, I'm new to this so bear with my noobish question.
Basically I want a user to enter a search phrase into a web-form and for the query to be passed to the lastFM API and return top artists using that phrase based on their "gettopartists" API node. Here's the code I have...
function last($q){
$target_url='http://ws.audioscro...
I have two separate python scripts. One is for getting user location
information (which I get from web based geofeed provider.User Gsm is registerd
with that services).Another is for retrieving lastfm user track history.I have already
able to get user location data and user music track information.
Goal is to map those two script in su...
hi,
i have to crawl last.fm for users (university exercise). I'm new to python and get following error:
Traceback (most recent call last):
File "crawler.py", line 23, in <module>
for f in user_.get_friends(limit='200'):
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pylast.py", li...
Hi I am using ColdFusion to call the last.fm api, using a cfc bundle sourced from here.
I am concerned about going over the request limit, which is 5 requests per originating IP address per second, averaged over a 5 minute period.
The cfc bundle has a central component which calls all the other components, which are split up into secti...
Hello,
I want to keep last.fm's user recent music tracks list to postgresql database table using pylast interface.But when I tried to insert values to the table it shows errors.Code example:
import pylast
import psycopg2
import re
from md5 import md5
import sys
import codecs
import psycopg2.extensions
psycopg2.extensions.register_type...
Hi All,
I am building an RESTful API for an application I am working on and client coders need to be able to submit data to the API on behalf of a user. All the popular API's I've used require me to send the generated session token (created when a user is logged in) for the user with a request to post information on the users behalf.
M...
On the Last.fm website, your recently listened track include the 34x34 (or whatever size) image at the left of each song. However, in the RSS feed that they give you, no image URLs are provided for the songs. I was wondering if there was a good way of figuring out the ID for the image that needs to be used for that artist and displaying ...
All,
I have a class function to interface with the RESTful API for Last.FM - its purpose is to grab the most recent tracks for my user. Here it is:
private static $base_url = 'http://ws.audioscrobbler.com/2.0/';
public static function getTopTracks($options = array())
{
$options = array_merge(array(
'user' => 'bachya',
'peri...
I have already asked in their forums ([1], [2]) but I don't seem to get an answer there.
It seems that the official Lastfm SVN (svn://svn.audioscrobbler.net/clientside/Last.fm) is not updated anymore since a long time (last version-tag is 1.4.1.57486 - last commit from 2007).
Where is the current code of the 1.* branch? Moved to Git or...
I'm trying to make an HTTP Get request using JQuery, but I get an empty string as a response, so I figure I'm doing something wrong. I used the documentation from http://api.jquery.com/jQuery.get/ as a guide.
My code looks like this
$.get("http://www.last.fm/api/auth/?api_key=xxxkeyxxx", function(data){
window.console.log(data);
...
Hi
Is it possible to allow users to preview music from either Last.fm or iTunes from within my app?
Are apple OK with apps streaming preview clips of music in apps?
This is a monotouch app.
w://
...
Is there anyway to use user.getTopTracks for a time period, with a start and end, as opposed to a time duration?
I know you can send a period parameter such as 7day, 3month etc, which returns the top track for that period up until the present day, but is there anyway to get the top tracks like this: for the time period 1 Jan 07 - 31 Feb...
I'm using jquery to access a method of the Last.FM API. Here is my jquery code:
$.get('http://ws.audioscrobbler.com/2.0/','method=user.getweeklytrackchart&user=rj&api_key=fb04ae401284be24afba0fbc2f4b0efb', function(data,status) {
console.debug("in result method");
console.debug(data);
});
Here is the console o...