Bigger Artist Thum Last Fm Scraper

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
sregg Offline
Junior Member
Posts: 24
Joined: Jan 2010
Reputation: 0
Post: #1
Hi!
I would love to see bigger artist thumbs with the last fm scrapper.
I saw that, for instance with Miles Davis, on his last fm profile page :

http://www.last.fm/music/Miles%2520Davis

the image is : http://userserve-ak.last.fm/serve/252/25760911.jpg which is only 252px height

but if you click on this image, you'll have a bigger image (most of the time) :
http://userserve-ak.last.fm/serve/_/2576...rdland.jpg which is a bit bigger

This would be great if we could get this image (the original) instead of the profile thumb.

Another thing, there are a lot of images for each artist, it would be great to get all of them and be able to choose a different one in xbmc

I'm a java/xml developer and i could start looking into the xml of the scraper and look at the regexps, etc...
I tried to find the description of the scraper (xbmc live camelot) without success.

Could anyone help me on this?

And by the way, big thx to the persons who worked on this scraper!
find quote
sregg Offline
Junior Member
Posts: 24
Joined: Jan 2010
Reputation: 0
Post: #2
I've just found that last fm exposed an API (webservices) :

http://ws.audioscrobbler.com/2.0/?method...b7b2e0a026

We would just have to parse this result and get only the "original" image
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #3
well, have at it. common/lastfm.xml
find quote
sregg Offline
Junior Member
Posts: 24
Joined: Jan 2010
Reputation: 0
Post: #4
couldn't find any common directory nor lastfm.xml file...
i use xbmc live 9.11
find quote
sregg Offline
Junior Member
Posts: 24
Joined: Jan 2010
Reputation: 0
Post: #5
found it :

/usr/share/xbmc/system/

i was looking into :

/home/xbmc
find quote
sregg Offline
Junior Member
Posts: 24
Joined: Jan 2010
Reputation: 0
Post: #6
found this :

Code:
<GetLastFMArtistThumbs dest="5">
        <RegExp input="$$2" output="&lt;details&gt;\1&lt;/details&gt;" dest="5">
            <RegExp input="$$1" output="&lt;thumb&gt;\1&lt;/thumb&gt;" dest="2">
                <expression noclean="1" repeat="yes">&lt;size name=&quot;original&quot;[^&gt;]*&gt;([^&lt;]*)&lt;/size&gt;</expression>
            </RegExp>
            <expression noclean="1"></expression>
        </RegExp>
    </GetLastFMArtistThumbs>

i'm not familiar with these scrapers
it's written "original" does it mean that it actually already get the biggest artist image it can?
find quote
sregg Offline
Junior Member
Posts: 24
Joined: Jan 2010
Reputation: 0
Post: #7
there's also a lastfm.xml directly under the scrapers directory and i found this :

Code:
            <RegExp input="$$1" output="&lt;thumb&gt;\2&lt;/thumb&gt;" dest="5+">
                <expression noclean="1">&lt;image size=&quot;(extra)?large&quot;&gt;([^&lt;]*)&lt;/image&gt;</expression>
            </RegExp>

it seems that it gets only the large or extralarge images (and not the original ones)
so does that mean that the common/lastfm.xml file is not used?
find quote
sregg Offline
Junior Member
Posts: 24
Joined: Jan 2010
Reputation: 0
Post: #8
i did it :

just replace this :

Code:
<RegExp input="$$1" output="&lt;thumb&gt;\2&lt;/thumb&gt;" dest="5+">
    <expression noclean="1">&lt;image size=&quot;(extra)?large&quot;&gt;([^&lt;]*)&lt;/image&gt;</expression>
</RegExp>

by

Code:
<RegExp input="$$1" output="&lt;thumb&gt;\1&lt;/thumb&gt;" dest="5+">
    <expression noclean="1">&lt;image size=&quot;mega&quot;&gt;([^&lt;]*)&lt;/image&gt;</expression>
</RegExp>

Now i would like to know how to refresh all the artists thumbs without deleting all my music database
Any ideas?

Another thing, i saw that for a lot of my artists, htbthumbs have been retrieved and are much better than the last fm "mega" artist images.
My question is : how i can do to retreive htb thumbs in priority (if exists) and then last fm images (if htb doesn't exist) ?

Thanks in advance for your help
(This post was last modified: 2010-02-06 19:13 by sregg.)
find quote