User script to load artist data from wikipedia

You don’t need to touch the URL relationships.
If the script works properly, you should paste the WD URL in the right‐hand side of the page:


BTW @loujin, I have made a quick PR to enable the pasting of WD URLs that you get from WP sidebars. They do not work, currently.

4 Likes

@paulakreuzer: I pulbished a new version of the script that should fix in part your points 2, 3, and 4 (probably still missing some cases for the external links, and some http instead of https are forced by the MB URL validation script)

@OneMusicDream: did you manage to have the script running?

You can find wikidata fields codes on this properties page and others. My script only recognizes some of those, so ask me if you have a specific case you want added (or submit a patch)

Why not, but where? The point of the script when adding a new artist is that you search in wikipedia first, copy the wikidata link and don’t fill the name directly in the MB form :slight_smile:

I don’t like this idea because it makes it too easy to make mistakes. I want people to go on wikipedia/wikidata and check before adding data in MB.

@jesus2099: :heart: thanks, I published your PR

3 Likes

Yes, I’m using the script with Tampermonkey on Firefox on Windows.
Just for my knowledge: how can I disable/remove the script? I can’t find it in the Tampermonkey menu.

I’m not using it for adding new artists at this moment. I’m using it to harvest extra data (from WikiData) for the already existing artists in the database. So a button to speed up searching would be nice :slight_smile:

True but in the same time, by adding that link, it will speed up the searching process (the checking you was talking about).

I would also like to place another feature request: when the WikiData link already exists, it would be nice to have a button to copy the link and to add it into the loujine GM tools text input box. It saves time by sparing the user from doing a repeated copy-paste routine

This is a really nice script, tanks!

Nice, thanks.

About the duplicate homepages: Afaict the script now recognizes links as the same whether or not they have a dash at the end, but it seems it still wants to add duplicates for links with and without the www. part.

@loujin, here is an oddity I just wanted to let you but no need to fix IMO because it would be difficult I think because the fault of MBS and anyway, there is no real life need (I don’t know why it often happens to me, it’s nonsense to do that):

  1. Go to an artist that already has a link to Wikidata
  2. Edit artist, copy WD URL, remove WD URL relationship, don’t Enter edit yet
  3. Paste WD URL in your script field

It will add WD URL back (good) but will mark this as « This relationship already exists. » (no good): Seems to be MBS’ fault. :slight_smile:

@loujin - sorry for “harrasing” you but can you make another script to harvest the links from Discogs too? :smiley:
Or maybe better, change this script so it can harvest links from Discogs too?

For example I’m editing now this artist Anhken and the already existing Discogs links contains five extra links.
So it would be nice to collect them too.

@loujin - and to collect the links from http://lyrics.wikia.com too :slight_smile:
For example I’m editing this band now - Vama - and the lyrics.wikia page contains some six links about the band.

See https://wiki.musicbrainz.org/Guides/Userscripts
Yes there is a discogs user script.

3 Likes

Thanks for the link, I didn’t know about it.
But the discogs script is for importing releases, it can’t be used for importing links about artists

@loujin - this script is missing in the list, can you add it?

@loujin - I got a list with 1,200 WikiData items that have a MusicBrain link. Those MusicBrainz items don’t have a WikiData link.
Can you write a bot to add such WikiData links automatically?
The bot should add the data collected from WikiData, like this script is doing - and to report any warnings (the messages this script is showing in red) so the users can fix them manually.

My list looks like this:

I published a new version of the script that should accept wikipedia URLs directly now (if it contains a wikidata link of course).

I could try to fix that but that’s low priority for me.

Indeed tt seems the same happens without the script.

Technically probably, realistically no. The data on discogs is not organized enough for data extraction. If I look at something one day it will be from discogs data dumps, not their website.
If you just want to extract links you might be able to do so by modifying my script, shouldn’t be too complicated if you know javascript.
Idem for wikia.

I don’t understand what you are talking about. If you want to modify the wiki page feel free.

Nope, I never looked at writing a bot

4 Likes

This is awesome! :clap: :clap: :clap:

PS: After doing almost 2000 edits with this today - all the time working perfectly (thanks again :+1:) - I found one little glitch with the new function:

en: Stephan Marcellus is clearly linked to Q47507603 but for some reason your script picks Q52306598 (Marcus Orelias) instead, which is not linked to any Wikipedia page.

1 Like

The page apparently links to Orelias’s wikidata page instead of wikipedia and my script is misled. It should be easy to fix

Yes, I was thinking only about collecting links from Discogs and WikiData.
Come on, it would take me days - to create all the accounts and to change and test the script. For you it would only take a few minutes :slight_smile:
Pretty please!! :slight_smile: