# \[WS\] Beatport.com by stevehero \[Release, Single Track & Artwork tagging\]

**URL:** https://community.mp3tag.de/t/ws-beatport-com-by-stevehero-release-single-track-artwork-tagging/12568
**Category:** Web Sources Scripts
**Created:** [October 4, 2011, 9:07pm UTC](https://community.mp3tag.de/t/ws-beatport-com-by-stevehero-release-single-track-artwork-tagging/12568 "2011-10-04T21:07:57Z")
**Posts on this page:** 20
**Page:** 48

<div class="post-metadata">

### Author: ![iamyou](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/i/c68b51/32.png) [@iamyou](https://community.mp3tag.de/u/iamyou)
#### Post date: [July 12, 2023, 3:01pm UTC](https://community.mp3tag.de/t/ws-beatport-com-by-stevehero-release-single-track-artwork-tagging/12568/953 "2023-07-12T15:01:50Z")

</div>

> [@djepeto](#):
>
> No track length at first page anymore.

It's as if Beatport followed Musk's stance of restricting 'scrapers' of its data/information,  
and so Beatport also figured out that track length information was unique enough  
to match song titles and names with.  
Then, they decided to bury track length even further into the code.

---

<div class="post-metadata">

### Author: ![Cuchi](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/51bf81/32.png) [@Cuchi](https://community.mp3tag.de/u/Cuchi)
#### Post date: [July 12, 2023, 4:55pm UTC](https://community.mp3tag.de/t/ws-beatport-com-by-stevehero-release-single-track-artwork-tagging/12568/954 "2023-07-12T16:55:14Z")

</div>

Hi dude,

When can you help us with the script update and how can we support you?

---

<div class="post-metadata">

### Author: ![bitskream](https://community.mp3tag.de/user_avatar/community.mp3tag.de/bitskream/32/7247_2.png) [@bitskream](https://community.mp3tag.de/u/bitskream)
#### Post date: [July 12, 2023, 5:06pm UTC](https://community.mp3tag.de/t/ws-beatport-com-by-stevehero-release-single-track-artwork-tagging/12568/955 "2023-07-12T17:06:01Z")

</div>

It looks like the reorganized info is now more efficiently packed into a JSON data structure, all on a single line. That means the original scripts cannot parse it, though it does look like all the info is there. My regex knowledge is insufficient to mod the scripts to extract just the JSON record, as extracting the info from that should be relatively straightforward. Track length info is still present, and even Camelot Key info is present now, so the previous script code to convert key format will become redundant.

---

<div class="post-metadata">

### Author: ![Wannastayunercover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/977dab/32.png) [@Wannastayunercover](https://community.mp3tag.de/u/Wannastayunercover)
#### Post date: [July 12, 2023, 7:12pm UTC](https://community.mp3tag.de/t/ws-beatport-com-by-stevehero-release-single-track-artwork-tagging/12568/956 "2023-07-12T19:12:07Z")

</div>

Looking at it ATM, I guess steve should amend his code pretty quickly since json support in mp3tag is straightforward and code should be lighter. Btw I saw a "score" section in data could be usefull to carry it on for automation tools.

---

<div class="post-metadata">

### Author: ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)
#### Post date: [July 12, 2023, 10:29pm UTC](https://community.mp3tag.de/t/ws-beatport-com-by-stevehero-release-single-track-artwork-tagging/12568/957 "2023-07-12T22:29:20Z")

</div>

A link has always been in the starting post 🙃

Most of the code used the JSON parsing methods available where it could. I'll have to have a closer look. Hopefully, they've added more data and whatnot to the JSON. I'll try to get working on it as soon as I can.

---

<div class="post-metadata">

### Author: ![DaveSumm](https://community.mp3tag.de/user_avatar/community.mp3tag.de/davesumm/32/7819_2.png) [@DaveSumm](https://community.mp3tag.de/u/DaveSumm)
#### Post date: [July 13, 2023, 12:28am UTC](https://community.mp3tag.de/t/ws-beatport-com-by-stevehero-release-single-track-artwork-tagging/12568/958 "2023-07-13T00:28:55Z")

</div>

Beers coming your way if you manage to fix this. Even more beers if you can figure out how to search within a publisher (I mentioned it earlier)

---

<div class="post-metadata">

### Author: ![Cuchi](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/51bf81/32.png) [@Cuchi](https://community.mp3tag.de/u/Cuchi)
#### Post date: [July 13, 2023, 3:27am UTC](https://community.mp3tag.de/t/ws-beatport-com-by-stevehero-release-single-track-artwork-tagging/12568/959 "2023-07-13T03:27:28Z")

</div>

Donation sent for a coffee 😉

---

<div class="post-metadata">

### Author: ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)
#### Post date: [July 13, 2023, 6:04pm UTC](https://community.mp3tag.de/t/ws-beatport-com-by-stevehero-release-single-track-artwork-tagging/12568/960 "2023-07-13T18:04:00Z")

</div>

Big coffee that. Thank you. Will get started later on. I'm going to change that donation link to revolut as PayPal skim around 13% off which is bad for both you and I.

So if you feel like making a donation, hold off for a bit until I change that.

---

<div class="post-metadata">

### Author: ![Wannastayunercover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/977dab/32.png) [@Wannastayunercover](https://community.mp3tag.de/u/Wannastayunercover)
#### Post date: [July 13, 2023, 6:32pm UTC](https://community.mp3tag.de/t/ws-beatport-com-by-stevehero-release-single-track-artwork-tagging/12568/961 "2023-07-13T18:32:54Z")

</div>

Steve , tell me how do you reach object queries I'm stuck at this point.

Started with :  
regexpreplace "._application/json"\>({._)\</script\>\<iframe.\*" "$1"

json "ON" "current"

json\_select\_object "props"  
json\_select\_object "pageProps"  
json\_select\_object "dehydratedState"  
json\_select\_object "queries"

I've forgotten asterisks wouldn't display, they are in the code

---

<div class="post-metadata">

### Author: ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)
#### Post date: [July 13, 2023, 7:23pm UTC](https://community.mp3tag.de/t/ws-beatport-com-by-stevehero-release-single-track-artwork-tagging/12568/962 "2023-07-13T19:23:20Z")

</div>

> [@Wannastayunercover](#):
>
> ._application/json"\>({._)\<iframe.\*

Regex needs a bit of work.

> **[regex101: build, test, and debug regex](https://regex101.com/r/qG5q5s/1)**
>
> Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java, C#/.NET, Rust.

---

<div class="post-metadata">

### Author: ![Wannastayunercover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/977dab/32.png) [@Wannastayunercover](https://community.mp3tag.de/u/Wannastayunercover)
#### Post date: [July 13, 2023, 8:23pm UTC](https://community.mp3tag.de/t/ws-beatport-com-by-stevehero-release-single-track-artwork-tagging/12568/963 "2023-07-13T20:23:28Z")

</div>

whatever 🤭 🔚 body too short they say

---

<div class="post-metadata">

### Author: ![Cuchi](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/51bf81/32.png) [@Cuchi](https://community.mp3tag.de/u/Cuchi)
#### Post date: [July 13, 2023, 8:47pm UTC](https://community.mp3tag.de/t/ws-beatport-com-by-stevehero-release-single-track-artwork-tagging/12568/964 "2023-07-13T20:47:47Z")

</div>

Also consider USDT TRC20 to be able to donate since I do not have access to REVOLUT

---

<div class="post-metadata">

### Author: ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)
#### Post date: [July 13, 2023, 8:51pm UTC](https://community.mp3tag.de/t/ws-beatport-com-by-stevehero-release-single-track-artwork-tagging/12568/965 "2023-07-13T20:51:29Z")

</div>

This'll get you going.

```auto
# Remove non JSON from HTML, leaving only valid JSON
regexpreplace "<!DOCTYPE\s+.+?json\">" "" # Remove before JSON
regexpreplace "</script><noscript>.+?</html>" "" # Remove after JSON

```

then paste the output after this in the output file into [https://jsonlint.com/](https://jsonlint.com/). It will format the JSON so you can make out what's, what. **Hint** `queries` is an array. You need to use the right method, not forgetting to give it an index.

You'll see how I did in the the script when I have it done. But work with this info. If I show you fully you may not learn as well. 🙃

Will probably not be today or tomorrow I get this done. Off work, car to get serviced, golf and movie are planned.

**Anyway:**

 ![image](https://community.mp3tag.de/uploads/default/original/2X/c/c1844be43712243cdbb71f025be5e53c02fc7cbd.png)

---

<div class="post-metadata">

### Author: ![houselanguage](https://community.mp3tag.de/user_avatar/community.mp3tag.de/houselanguage/32/5012_2.png) [@houselanguage](https://community.mp3tag.de/u/houselanguage)
#### Post date: [July 13, 2023, 8:59pm UTC](https://community.mp3tag.de/t/ws-beatport-com-by-stevehero-release-single-track-artwork-tagging/12568/966 "2023-07-13T20:59:16Z")

</div>

Take your time Big B! Patiently waiting for the new update like most of us! Thanks!

---

<div class="post-metadata">

### Author: ![owlcatz](https://community.mp3tag.de/user_avatar/community.mp3tag.de/owlcatz/32/9883_2.png) [@owlcatz](https://community.mp3tag.de/u/owlcatz)
#### Post date: [July 13, 2023, 9:05pm UTC](https://community.mp3tag.de/t/ws-beatport-com-by-stevehero-release-single-track-artwork-tagging/12568/967 "2023-07-13T21:05:00Z")

</div>

Thanks again Steve no worries waiting here. Appreciate your responsiveness! 💥💥❤❤

---

<div class="post-metadata">

### Author: ![Wannastayunercover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/977dab/32.png) [@Wannastayunercover](https://community.mp3tag.de/u/Wannastayunercover)
#### Post date: [July 13, 2023, 10:27pm UTC](https://community.mp3tag.de/t/ws-beatport-com-by-stevehero-release-single-track-artwork-tagging/12568/968 "2023-07-13T22:27:02Z")

</div>

![image](https://community.mp3tag.de/uploads/default/original/2X/7/792d6b742267f3cca791e670910152c9335f69c0.png)

on its way too

---

<div class="post-metadata">

### Author: ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)
#### Post date: [July 14, 2023, 12:00am UTC](https://community.mp3tag.de/t/ws-beatport-com-by-stevehero-release-single-track-artwork-tagging/12568/969 "2023-07-14T00:00:39Z")

</div>

95% done but I have to sleep.

The Camalot key is available in the JSON which is a nice have along with the ISRC and UPC.

 ![image](https://community.mp3tag.de/uploads/default/original/2X/4/4b35b4eb1d9cdcba2bf43d82ef17c2b66679d22c.png)

---

<div class="post-metadata">

### Author: ![bitskream](https://community.mp3tag.de/user_avatar/community.mp3tag.de/bitskream/32/7247_2.png) [@bitskream](https://community.mp3tag.de/u/bitskream)
#### Post date: [July 14, 2023, 12:14am UTC](https://community.mp3tag.de/t/ws-beatport-com-by-stevehero-release-single-track-artwork-tagging/12568/970 "2023-07-14T00:14:39Z")

</div>

Excellent! Share your Revolut details when you get a minute! 😉

---

<div class="post-metadata">

### Author: ![thesuperintendent](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/4da419/32.png) [@thesuperintendent](https://community.mp3tag.de/u/thesuperintendent)
#### Post date: [July 14, 2023, 9:08am UTC](https://community.mp3tag.de/t/ws-beatport-com-by-stevehero-release-single-track-artwork-tagging/12568/971 "2023-07-14T09:08:41Z")

</div>

Awesome work again @stevehero

---

<div class="post-metadata">

### Author: ![Wannastayunercover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/977dab/32.png) [@Wannastayunercover](https://community.mp3tag.de/u/Wannastayunercover)
#### Post date: [July 14, 2023, 9:26pm UTC](https://community.mp3tag.de/t/ws-beatport-com-by-stevehero-release-single-track-artwork-tagging/12568/972 "2023-07-14T21:26:39Z")

</div>

for the ones who may want to modify the already existring script :

> **here the json part for track search**
>
> ```plaintext
> [ParserScriptIndex]=...
> 
> debug "on" "c:\BEATPORT track search debug index.html" 20
> DebugWriteInput "c:\debug-input.out"
> 
> findline "<!DOCTYPE html>"
> findinline "<!DOCTYPE html>"
> joinuntil "</body>"
> replace "|" "$verticalBar()"
> 
> regexpreplace ".*application\/json\">({.*)<\/script><noscript><iframe.*" "$1"
> 
> json "ON" "current"
> 
> json_select_object "props"
> json_select_object "pageProps"
> json_select_object "dehydratedState"
> 
> json_select_array "queries" 1
> json_select_object "state"
> json_select_object "data"
> 
> json_foreach "data"
> json_select "release_date" # RELEASED
> sayrest
> say "|"
> json_select_object "release" # RELEASE
> json_select "release_name"
> sayrest
> say "|"
> json_unselect_object
> 
> json_select "length" # LENGTH
> sayrest
> say "|"
> 
> json_select "track_id" # ID
> sayrest
> say "|"
> 
> json_select "track_name" # TITLE
> sayrest
> say " ("
> json_select "mix_name"
> sayrest
> say ")"
> say "|"
> 
> json_select_many "artists" "artist_name" ", " # artists
> sayrest
> say "|"
> 
> json_select_many "artists" "artist_name" ", " # remixers
> sayrest
> say "|"
> 
> json_select_object "label" # LABEL
> json_select "label_name"
> sayrest
> json_unselect_object
> say "|"
> 
> json_select_many "genre" "genre_name" " ● " # GENRES/S
> sayrest
> say "|"
> 
> sayrest
> say "https://www.beatport.com/track/" # _URL
> say "-/"
> json_select "track_id"
> 
> sayrest
> saynewline
> json_foreach_end
> `
> and here's the one for track direct `
> regexpreplace ".*application\/json\">({.*)<\/script><noscript><iframe.*" "$1"
> 
> json "ON" "current"
> 
> json_select_object "props"
> json_select_object "pageProps"
> json_select_object "dehydratedState"
> json_foreach "queries"
> json_select_object "state"
> json_select_object "data"
> json_select_object "release"
> json_select "id"
> ifnot ""
> outputto "BEATPORT_RELEASE_ID"
> sayrest
> 
> outputto "ALBUM"
> json_select "name"
> sayrest
> 
> outputto "COVERURL"
> json_select_object "image"
> json_select "uri"
> json_unselect_object
> sayrest
> 
> outputto "PUBLISHER"
> json_select_object "label"
> json_select "name"
> json_unselect_object
> sayrest
> 
> json_unselect_object
> 
> outputto "BEATPORT_TRACK_ID"
> json_select "id"
> sayrest
> 
> outputto "BEATPORT_TRACK_URL"
> say "https://www.beatport.com/track/"
> say "-/"
> json_select "id"
> sayrest
> 
> outputto "ARTIST"
> json_select_many "artists" "name" ", "
> sayrest
> 
> outputto "MIXARTIST"
> json_select_many "remixers" "name" ", "
> sayrest
> 
> outputto "Length" # shows track length when only single track available, convenient to check time comparison
> json_select "length"
> sayrest
> 
> outputto "BPM" 
> json_select "bpm"
> sayrest
> 
> outputto "CATALOG #"
> json_select "catalog_number"
> sayrest
> 
> outputto "GENRE"
> json_select_object "genre"
> json_select "name"
> sayrest
> json_unselect_object
> 
> outputto "INITIALKEY"
> json_select_object "key"
> json_select "camelot_number"
> sayrest
> json_select "camelot_letter"
> sayrest
> outputto "CHORD"
> json_select "name"
> sayrest
> json_unselect_object
> 
> outputto "ISRC"
> json_select "isrc"
> sayrest
> 
> outputto "TITLE"
> json_select "name"
> sayrest
> json_select "mix_name"
> say " ("
> sayrest
> say ")"
> outputto "YEAR"
> json_select "publish_date"
> sayrest
> 
> endif
> 
> json_unselect_object
> json_unselect_object
> json_unselect_object
> json_foreach_end
> 
> json_unselect_object
> json_unselect_object
> json_unselect_object
> json "OFF"
> 
> ```

Got the release search and release details code done as well but since I use almost no more original code neither tab order lists I won't publish the whole code. fix the necessary parts.

Searches seem to be faster than before, would say 40% faster

[Previous page](https://community.mp3tag.de/t/ws-beatport-com-by-stevehero-release-single-track-artwork-tagging/12568.md?page=47)

[Next page](https://community.mp3tag.de/t/ws-beatport-com-by-stevehero-release-single-track-artwork-tagging/12568.md?page=49)
