# 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:** 25

<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 23, 2011, 8:14am UTC](https://community.mp3tag.de/t/script-for-ripping-genre-year-record-label-from-beatport-com/11227/25 "2011-08-23T08:14:36Z")

</div>

> [@stevehero](#):
>
> Just to let you know I came across a URL which didn't work,  
> John Dahlbäcks - Out There [http://www.beatport.com/release/out-there/170967](http://www.beatport.com/release/out-there/170967)  
> I thought it was my mod to the script but I referenced it against the original one and it had the same problem.

The problem is the missing cover of the release. I stumbled across similar releases. I described the problem here and also present a solution:  
[[ws] beatport.com](https://community.mp3tag.de/t/12325/7)

> [@stevehero](#):
>
> How come the order in which the headings belong is so important?

Because the parsing of the web source always runs from left to right and from up to down. Commands like findline and findinline only look in one direction. If the parser is already behind a certain entry, it will not find it with a simple findline command. So it is a good advice to parse the entries of a document in the order of the document.

There are different sollutions to overcome this.

- **gotoline 1** always sets the parser back to the top of the page
- **gotochar 1** always sets the parser back to the start of the line
- you can search backward with commands like:  
**findinline "whatever" -1  
findline "whatever" -1  
moveline -1**

btw: are you using the **debug** command? Very helpfull to see what exactly the script is doing in every line.

> [@stevehero](#):
>
> Are you a web developer as such or do you need to be in order to do this lark?

No, I'm just a manic music collector with too much time. I learned these things here in the forum and by doing over the last years.

> [@stevehero](#):
>
> Regards the script is it possible to parse beatport for compilations?

What is the problem with compilations? They are parsed like normal releases.  
Do you want a tagfield like COMPIPLATION = 1 for compilations? The problem will be that beatport treats proper compilations in the same way as albums with featuring or remix artists. And I can see nothing like releasetype = single/album/compilation on beatport. So I don't know how to built something in the script which decides if it is a compilation or not.

What can be done is simply to write COMPIPLATION = 1 for every release where VA is put in as albumartist. For that, put that into the script (only the part in the Code window. the rest is for you to see where exactly to put it in):

```
if "<performer ref=\"Artist\""

```

###################CHANGE "VA" TO YOUR LIKING###################

```
    set "albumartist", "VA"

```

###################CHANGE "VA" TO YOUR LIKING###################

```
outputto "compilation"
say "1"endif

```

> [@stevehero](#):
>
> And I have a further Q down the page regards the "currentStatus (string)" which includes "exlusive, classics etc"

Can you give me a release that is marked as "classic"? I have found this status only for tracks, not for a whole release.  
Do you also want "gerneral content" and "new release". Consider, "general content" holds no info at all and "new release" will be outdated a month later.

> [@stevehero](#):
>
> If you take a look here [http://bit.ly/qtXs3k](http://bit.ly/qtXs3k) on there releases page you'll find it, the page you were referring to is just the artist page which only shows there LATEST RELEASES

No, I still can't see it. Only "Serious", not "Serious Remixes". And the link to the releasepage as presented in the API page gives an empty page: [http://www.beatport.com/release/serious-remixes/399988](http://www.beatport.com/release/serious-remixes/399988)

---

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