# \[WS\] Last.fm Genre/Mood with Whitelist

**URL:** https://community.mp3tag.de/t/ws-last-fm-genre-mood-with-whitelist/10968
**Category:** Web Sources Scripts
**Created:** [October 18, 2010, 1:39pm UTC](https://community.mp3tag.de/t/ws-last-fm-genre-mood-with-whitelist/10968 "2010-10-18T13:39:25Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![hosteddinner](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/9de053/32.png) [@hosteddinner](https://community.mp3tag.de/u/hosteddinner)
#### Post date: [October 18, 2010, 1:39pm UTC](https://community.mp3tag.de/t/ws-last-fm-genre-mood-with-whitelist/10968/1 "2010-10-18T13:39:25Z")

</div>

I wrote a script which gets genre and mood (with a whitelist) from last.fm tags of the title:

You need to know the artist and the title of the track (just works proper with single track choosen)

Edit 19.10: Overnight I got the idea to fetch tags from the album, so now there are two Versions: One gets tags from track and one which gets tags from album. Second one works good if you choose an complete album.  
Attetion: Sometimes your artist/track/album tag must match exactly of these at last.fm to get any result... Nevertheless try it out...

Edit 1.1.11 😃 : Now there are 3 Versions, 1 additional which gets tags just from artist...

[Genre\_and\_Mood.zip](https://community.mp3tag.de/uploads/default/original/2X/7/72f57fa18306c8f045dd5b509d7c1092765e934e.zip) (6.47 KB)

---

<div class="post-metadata">

### Author: ![Windjammer](https://community.mp3tag.de/user_avatar/community.mp3tag.de/windjammer/32/68_2.png) [@Windjammer](https://community.mp3tag.de/u/Windjammer)
#### Post date: [November 21, 2010, 9:07pm UTC](https://community.mp3tag.de/t/ws-last-fm-genre-mood-with-whitelist/10968/2 "2010-11-21T21:07:13Z")

</div>

Very nice script, thank you! How do I change it to write commas instead of // as seperator?

> [@HostedDinner](#):
>
> I wrote a script which gets genre and mood (with a whitelist) from last.fm tags of the title:
> 
> You need to know the artist and the title of the track (just works proper with single track choosen)
> 
> Edit 19.10: Overnight I got the idea to fetch tags from the album, so now there are two Versions: One gets tags from track and one which gets tags from album. Second one works good if you choose an complete album.  
> Attetion: Sometimes your artist/track/album tag must match exactly of these at last.fm to get any result... Nevertheless try it out...

---

<div class="post-metadata">

### Author: ![hosteddinner](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/9de053/32.png) [@hosteddinner](https://community.mp3tag.de/u/hosteddinner)
#### Post date: [January 1, 2011, 8:48pm UTC](https://community.mp3tag.de/t/ws-last-fm-genre-mood-with-whitelist/10968/3 "2011-01-01T20:48:54Z")

</div>

I wasn't a long time here 😃  
So maybe you found the answer of your question, but if not, here:  
At the end of the two rows with the "filter", is "\\" that just have to be changed to "," or ", "! (there are 4 slashes because they are escaped)  
So have fun!

---

<div class="post-metadata">

### Author: ![Akovia](https://community.mp3tag.de/user_avatar/community.mp3tag.de/akovia/32/5690_2.png) [@Akovia](https://community.mp3tag.de/u/Akovia)
#### Post date: [March 17, 2011, 5:34pm UTC](https://community.mp3tag.de/t/ws-last-fm-genre-mood-with-whitelist/10968/4 "2011-03-17T17:34:00Z")

</div>

Error connecting to server "www.last.fm"

Most other scripts are working fine. Is this broken or am I missing something?

Thnx  
Ako

---

<div class="post-metadata">

### Author: ![hosteddinner](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/9de053/32.png) [@hosteddinner](https://community.mp3tag.de/u/hosteddinner)
#### Post date: [April 28, 2011, 6:18pm UTC](https://community.mp3tag.de/t/ws-last-fm-genre-mood-with-whitelist/10968/5 "2011-04-28T18:18:14Z")

</div>

Oh no, maybe I should enable email notification for this thread 😉

So, I know this problem happends when you type/use some special chars like !"§$%&/=?, (not all of them I think) because they are not converted to URI-format 😉  
I do not maintain this script really, because for my personal needs it fits perfectly, but I could try to fix this error a little bit...

---

<div class="post-metadata">

### Author: ![anon40879270](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/8797f3/32.png) [@anon40879270](https://community.mp3tag.de/u/anon40879270)
#### Post date: [August 30, 2015, 10:47am UTC](https://community.mp3tag.de/t/ws-last-fm-genre-mood-with-whitelist/10968/6 "2015-08-30T10:47:29Z")

</div>

> [@HostedDinner](#):
>
> I wrote a script which gets genre and mood (with a whitelist) from last.fm tags of the title:

Kann es sein, dass die LastFM-Scripts nicht mehr gültig sind?

---

<div class="post-metadata">

### Author: ![hosteddinner](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/9de053/32.png) [@hosteddinner](https://community.mp3tag.de/u/hosteddinner)
#### Post date: [August 30, 2015, 11:31am UTC](https://community.mp3tag.de/t/ws-last-fm-genre-mood-with-whitelist/10968/7 "2015-08-30T11:31:39Z")

</div>

> [@mbaa3](#):
>
> Kann es sein, dass die LastFM-Scripts nicht mehr gültig sind?

Ich benutze es nicht mehr. Ich war kurz auf der lastfm Api Seite, es scheint wohl, dass sie die Api ein wenig geändert haben. Das Skript habe ich 2010, also vor 5 Jahren erstellt, da passiert sowas mal. 😉

Ansonsten kann es natürlich auch sein, dass die API grade nicht funktioniert, siehe auf der last.fm Seite:

> [@](#):
>
> We’re currently migrating data (including scrobbles) to our new site and to minimise data disruption, we’ve temporarily suspended some functionality. Rest assured, we’re re-activating features one-by-one as soon as each data migration completes. Keep an eye on progress here.

---

<div class="post-metadata">

### Author: ![anon40879270](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/8797f3/32.png) [@anon40879270](https://community.mp3tag.de/u/anon40879270)
#### Post date: [January 21, 2016, 11:27am UTC](https://community.mp3tag.de/t/ws-last-fm-genre-mood-with-whitelist/10968/8 "2016-01-21T11:27:40Z")

</div>

> [@HostedDinner](#):
>
> Edit 1.1.11 😃 : Now there are 3 Versions, 1 additional which gets tags just from artist...

This sources do not work today.
