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

**URL:** https://community.mp3tag.de/t/script-for-ripping-genre-year-record-label-from-beatport-com/11227
**Category:** Web Sources Discussion
**Created:** [December 3, 2010, 1:16am UTC](https://community.mp3tag.de/t/script-for-ripping-genre-year-record-label-from-beatport-com/11227 "2010-12-03T01:16:56Z")
**Posts on this page:** 1
**Showing post:** 42

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [August 26, 2011, 10:11pm UTC](https://community.mp3tag.de/t/script-for-ripping-genre-year-record-label-from-beatport-com/11227/42 "2011-08-26T22:11:51Z")

</div>

> [@stevehero](#):
>
> See this realease [http://www.beatport.com/release/beatrocka/350912](http://www.beatport.com/release/beatrocka/350912) for example, BTW I dont care about the &'s seperating different artists. All I want is each seperate artist to be separated by ", " As long as say "Spencer & Hill" remain with the & because they're one artist. And the script works with regard the "VA" happening once there is more than 3 artist is ideal. Maybe were getting confused to want I want so in a nut shell heres what I want for:
> 
> **_2 artists:  
> Artist_**: Spencer & Hill, High Rankin  
> **_AlbumArtist_** : Spencer & Hill, High Rankin
> 
> **_3 artists:_**  
> **_Artist_** : Spencer & Hill, Madonna, Skrillex **(Weird combo I know!)  
> _AlbumArtist_**: VA

I don't understand what you want to say with this example. The Spence & Hil Release of your link is an one-artist release. High Rankin is only the remixer. You don't want Remixers listed as albumartists, do you?

Use this code, to get two ALBUMARTIST with a Comma as seperator. The only line I changed is the one in red print. Btw: the last line belongs logically under the following # TRACK headline.

# ALBUMARTIST

outputto "albumartist"  
findline "\<performer ref="Artist""  
joinuntil ""  
findinline ""  
sayuntil "\</"  
moveline 1  
unspace  
if "\<performer ref="Artist""

 

```
joinuntil "</performer>"

```

  say ", " 

```
findinline "<name>"
sayuntil "</"
moveline 1
unspace
if "<performer ref=\"Artist\""
    set "albumartist", "VA"

```

 # COMPILATION "1" IF "VA" outputto "compilation" say "1"

```
endif

```

 

endif  
replace "|" "/"

 

> [@stevehero](#):
>
> I see this within the script:  
> regexpreplace "\>\s+\<" "\>\<" basically in scripting it replaces all white spaces inside \>\< (non greedy) to "BLANK"?

 

no, only if there is nothing else as whitespaces

 \> bla bla \< 

will stay as it is

 \> \< 

will be replaced by

 \>\< 
QUOTE (stevehero @ Aug 25 2011, 08:31) \<{POST\_SNAPBACK}\>

I've tried to code this below can't see what I am doing wrong? Unless it a multi line issue within the API? 

```
# UNSYNCED LYRICS
        outputto "unsyncedlyrics"
        findline "<description>"
        findinline "<description>"
        sayuntil "</"<!--QuoteEnd--></div><!--QuoteEEnd-->

```

the solution is again:

gotoline 1

the parser was at the frist descirption of the "Users Also Bought" section at.

> [@stevehero](#):
>
> I have changed the 'coverurl' because I wanted to learn but am now curiuos to know can you add an if command to the ~ COVERURL then you search findline "width="60" height="60" ref="" instead

yes:

# COVERURL

outputto "coverurl"  
findline "width="500" height="500"" 1 1  
unspace  
ifnot "\<image url="

```
gotoline 1
findline "width=\"60\" height=\"60\" ref=\""
moveline 1

```

endif  
findinline "url=""  
sayuntil "" "

This makes use of an undocumented feature which is possible for some commands. findline "bla bla" 1 1. It is described here:  
[moveline to empty line fails](https://community.mp3tag.de/t/3063/4)

What are your exact questions about the two regualar expressions I used? I noticed the action group (which you won't use anyway) got displayed wrong in the forum, don't know why, I copy & pasted it from my Mp3tag Actions. I edited it in my post above and now it's correct.

---

_[View the full topic](https://community.mp3tag.de/t/script-for-ripping-genre-year-record-label-from-beatport-com/11227)._
