Script for ripping genre, year & record label from beatport.com

Here is the main URL:
http://www.beatport.com/release/alright-2011/371080
You get that by clicking on the preview button down left at the web sources dialog windows.

QUOTE (stevehero @ Aug 24 2011, 22:04) <{POST_SNAPBACK}>
I would like to know how to change the Album Artist to match that of the Artist with a ", " I tried modifing the code:
moveline 1
          unspace
          if "<performer ref=\"Artist\""
          joinuntil "</performer>"
          say ", "
          findinline "<name>"<PERFORMER performer ?

But this didn''t have the desired results. Its fine once the album goes over 3 artists then album artist becomes "VA" but having only two artists I want the " & " sign to become ", " and the title: Alright 2011 feat. Marcus Schossow ((Marcus Schossow Remix)) is not right. I'm not sure the reason for this.

I discovered the difference of artist and albumartist at many releases. I have solved this with an action group which I use after the web script i such cases. This also puts "artist 1, artist 2, artist 3" to "artist 1, artist 2 and artist 3":

Action 1: Format Value
Field: ARTIST
Formatstring: $regexp(%artist%,', ([^,]+)$',' & $1 ')

Action 2: Format Value
Field: MIXARTIST
Formatstring: $regexp(%mixartist%,', ([^,]+)$',' & $1 ')

But now as I dig deeper into that beatport script, I see it's easy to change inside the script:
change this:

<!--fonto:Courier New--><span style="font-family:Courier New"><!--/fonto-->outputto "Artist"
 sayregexp "(?<=<Artist>)[^<]+" <b>", "</b> "</track>"
 say "|"<!--fontc--></span><!--/fontc-->

into this:

<!--fonto:Courier New--><span style="font-family:Courier New"><!--/fonto-->outputto "Artist"
 sayregexp "(?<=<Artist>)[^<]+" <b>" & "</b> "</track>"
 say "|"<!--fontc--></span><!--/fontc-->

But that won't do the ..., ... & ... trick for three or more artists.
Here is a usefull threat on that freacky sayregxp command: /t/6993/1

For the ((Mixname)) thing: It seems that the beatport API page is somehow ill-formated. It has
(Marcus Schossow Remix)
where it normally should have
Marcus Schossow Remix

We can fix that with a regexpreplace command (the bold line is new):

<!--fonto:Courier New--><span style="font-family:Courier New"><!--/fonto-->outputto "tracks"
 findline "<name>"
 findinline ">"
 sayuntil "</"
 findline "<mixName>"

regexpreplace "(([^<]+))" "$1"

 findinline ">"<!--fontc--></span><!--/fontc-->

p.s.:
As you asked me for links at hints, I have forgotten to mention the very usefull freeware notepad++. It's like notedpad, but with plus plus more options and possibilities. It also refreshes the debug files when it is rewritten if you watch it with this tool:
http://notepad-plus-plus.org/
For this exists is an also very usefull language extension for the mp3tag web sources script language which highligts the comands of the script for a better overview. That helps to avoid typos, because you see they don't have the correct colour:
Web Sources Framework: Help needed

p.p.s:
I'm sorry. I didn't read your post carefully enough. I changed the , & artist albumartist thing exactly the other way around as you wanted it. For your desired solution you started right with replacing

say " & "

with

say ", "

at albumartist. And that is all what is necessary. You have also changed the next line (at least in the code you presented in your post). That would normally result into a Adjust Album Information window with all tag fields empty, because the line doesn't fit into the web sources syntax.

p.p.p.s:
Sorry, I also didn't understand your www problem. Here is the code for getting the main url when currentpreview is not available (as it is the case when you skip the [ParserScriptIndex]=... Part):

outputto "WWW"

gotoline 1
findline ""
findinline ""
say "http://www.beatport.com/release/"
sayuntil ""
say "/"
sayoutput "discogs_release_id"