Jump to content

Good way to get a song entry via AJAX (XmlHTTPRequest)


Recommended Posts

Exactly, what I'm trying to do is to incorparate those songfacts dynamically into the HTML of last.fm.

If none are given I will place a link so you can add them or comment on the song.

At the moment I can get a detail page via 2 seperate XmlHttpRequests. Worse I have to use regular expressions to parse the HTML I get.

This would be easier if there would be some kind of API that takes an artist and a track and returns some XML document. So my question is if there is any better way or hidden way to query the songfacts database.

Greets,

Broken One

Link to post
Share on other sites

No offense, but you should inform yourself of the capabilities of Greasemonkey it what it exactly is ;)

The whole insertion happens only in your browser via Java Script and XmlHttpRequests. last.fm will never notice and you won't have to ask them to let some code run in your browser^^.

Greets,

Broken One

P.S.: I'm nearly finsihed but I bet it will be rather slow with the whole requests and regexps.

Link to post
Share on other sites

I have a working beta, now. It is still looking somewhat ugly and I like to redesign it a little bit and add some links to songfacts.

I'm also missing some feedback when there are now songfacts available. What I dislike most is the way I have to search, it seems to work but it is not very good.

As soon as I finished the design and got a link back to songfacts in it I will publish the script on userscripts.org.

I would glady try to incorporate suggestions or add things if you have any suggestions?

Greets,

Broken One

Link to post
Share on other sites
  • 3 weeks later...

Yeah, I talked with some of the technical folk, and while this is possible, it creates the potential for problems, as other sites could easily steal the content if we were to set up some kind of API. It is a real interesting application, but I'm just not comfortable with what it could open up.

Link to post
Share on other sites
  • 4 weeks later...

One could steal your content with any webcrawler or programmed application. It would be easier with an API, but what about protecting the API so that only people with a login can access or use it?

Sorry that I didn't let you hear anything. I just started studying and had to move to a new city.

As soon as all is back to normal I will try to pretty up my version and get it out!

Greets,

Broken One

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...