YOUAREtehSCENE Posted June 21, 2010 Share Posted June 21, 2010 Curious as to how I would go about pulling band info from Last.fm. As in doing a cd review, and having it state simular bands as and it will list lets say 3 - 5 bands that people might enjoy! Quote Link to comment https://forums.phpfreaks.com/topic/205488-pulling-band-info-from-lastfm/ Share on other sites More sharing options...
.josh Posted June 22, 2010 Share Posted June 22, 2010 If you are writing a review, why would you need to automate it? Or are you gonna just automate the review thing too, madlibs style? Learn some regex, scrape pages. Or DOM might work if their html is decent. But you still may need to learn some regex to parse individual nodes. But first, ask yourself if you really wanna steal other people's content, because I don't know about you, but I'd have a hard time sleeping at night doing that sort of thing. Quote Link to comment https://forums.phpfreaks.com/topic/205488-pulling-band-info-from-lastfm/#findComment-1075376 Share on other sites More sharing options...
Philip Posted June 22, 2010 Share Posted June 22, 2010 If you are typing a review, why would you need to automate it? Or are you gonna just automate the review item too, madlibs style? Learn some regex, scrape code. Or DOM might work if their html is okay. But you still may need to learn some regex to parse individual nodes. But first, question yourself if you really wanna steal other people's stuff, because I don't know about you, but I'd have a hard time snoozing at night doing that sort of thing. Quote Link to comment https://forums.phpfreaks.com/topic/205488-pulling-band-info-from-lastfm/#findComment-1075378 Share on other sites More sharing options...
cags Posted June 22, 2010 Share Posted June 22, 2010 @KingPhilip, Crayon Violent lol, harsh. I can see the logic behind this, automatically appending a list of similar artists to the bottom of a review is no different to automatically appending a list of 'related articles' like many sites do. It's just a helpful service so that people who like the sound of the artist you are reviewing to find similar music. @OP Luckily for you last.fm provide an api, and this is one of the features. It's hardly stealing content when the provide an API for the very task. Also since it should provide you with perfect XML, you won't need any Regex skillz0rs, it's simply a case of parsing it with some form of DOM. . Quote Link to comment https://forums.phpfreaks.com/topic/205488-pulling-band-info-from-lastfm/#findComment-1075467 Share on other sites More sharing options...
.josh Posted June 22, 2010 Share Posted June 22, 2010 Cags: Right, listing similar artists is fine and dandy, no beef with that. Problem is it sounded like he's just wanting to scrape last.fm for their content and paste it on his site. But if they have an API that lets you do that then more power to him. I would suggest he read the API ToS very carefully though. I have a sneaking suspicion it probably requires mention of the content coming from last.fm and maybe a link to it or something. IOW no passing it off as your own content. Quote Link to comment https://forums.phpfreaks.com/topic/205488-pulling-band-info-from-lastfm/#findComment-1075529 Share on other sites More sharing options...
cags Posted June 22, 2010 Share Posted June 22, 2010 Indeed, you are supposed to include a link back. At the end of the day it's about the OPs intended usage, but I simply assumed they wanted to create something like... <div id="review"> They'z da shit man. </div> <div id="related_bands> You may also like: <ul> <li>Greenday</li> <li>Lady Gaga</li> <li>Chumbawumba</li> <li>The Spice Girls</li> </ul> Information Provided By <a href="http://last.fm">Last.fm</a> </div> <div id="comments"> Blah random comment things here like on a blog. </div> Quote Link to comment https://forums.phpfreaks.com/topic/205488-pulling-band-info-from-lastfm/#findComment-1075547 Share on other sites More sharing options...
YOUAREtehSCENE Posted June 22, 2010 Author Share Posted June 22, 2010 I downloaded the files http://www.matto1990.com/projects/phplastfmapi/ it comes with examples The picture shows "artist.getsimilar" Pretty Much what I want. http://i50.tinypic.com/10ood1h.jpg @ cags YOU HAVE MY IDEA THATS WHAT I WANT. Im really new to this so I'm all over this http://www.last.fm/api/webauth http://www.last.fm/api/account got my own account with the API key, and secret key trying to figure where to put it Pretty much, I'd like it to do is lets say I'm sure you guys have heard of this band I HOPE SO Blink182 under that It will show a small cd artwork if the band has it of certain other bands that people might enjoy if they like blink182 Quote Link to comment https://forums.phpfreaks.com/topic/205488-pulling-band-info-from-lastfm/#findComment-1075781 Share on other sites More sharing options...
YOUAREtehSCENE Posted June 28, 2010 Author Share Posted June 28, 2010 Something like this, that will keep the same band list Quote Link to comment https://forums.phpfreaks.com/topic/205488-pulling-band-info-from-lastfm/#findComment-1078462 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.