Plugin that scrapes genre from wikipedia?

Ive been looking all over for a way to pull genres from wikipedia. Im not a programmer but it does not seem like it would be very difficult. Anyone out there willing to create a script that would do this? I use KODI which handles multiple genres with (space)/(space). ie: pop / rock / hard rock
Thanks in advance

1 Like

I have thought about this myself but unfortunately my python skills are not that great.
You do not want Wikipedia instead you want to query wikidata.
There are already relationships between wikidata and musicbrainz and some wikidata entries do include a genre tag.
Does anyone know sparql ?

1 Like

This could actually be pretty cool. I’ve entered in tickets for both beets and Picard:


I’ve got a working plugin.

It only looks for release group links to wikidata at are moment but I am planning on adding artist and work links to wikidata.

This may still have bugs so please report these.
Any feedback welcome.


Dns, Thanks it works nicely, especially for artists whos releases are always the same genre like AC/DC, however artists such as Beck or twenty one pilots, can have one album that is rock and another that is country, is there a way to pull the genre from the album wiki page? Even deeper, some songs on some albums have differing genres (twenty one pilots - Blurryface) almost evey song has a different genre. Where this grainular data exists can it pull genre from these pages in order of priority; song, album, or artist?

Again thanks for all your work on this.


The plugin should theoretically do that but I could not find any examples to test.
This will currently look at all artists on the recording, a linked work entry and the release group to find a wikidata link.

This has mainly been tested on artist on the recording but the other two should work but I could not find that many examples to test.

I need to get around to learning QT so I can add a configuration panel to the gui.
Currently this pulls the genre tags and merges all the genre tags together but I can see how you would want to configure this.
Feel free to give suggestions on what you want.

Just use QT Designer. No coding required.