# \[WS\] iTunes

**URL:** https://community.mp3tag.de/t/ws-itunes/13478
**Category:** Web Sources Scripts
**Created:** [May 24, 2012, 10:05am UTC](https://community.mp3tag.de/t/ws-itunes/13478 "2012-05-24T10:05:22Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![slash366](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/a4c791/32.png) [@slash366](https://community.mp3tag.de/u/slash366)
#### Post date: [June 8, 2012, 10:52pm UTC](https://community.mp3tag.de/t/ws-itunes/13478/21 "2012-06-08T22:52:38Z")

</div>

oh wow that's it! superb that's been bugging me for a few days. i've been searching for a way to get the itunes meta onto the mp4's to show under the apple tv.

such a shame the lookup data doesn't seem to include cast, screenwriter or producer fields, only in the html. nevermind tho this will do nicely!

many thanks for your help with that and thanks again for your excellent script!

---

<div class="post-metadata">

### Author: ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)
#### Post date: [July 8, 2012, 6:02am UTC](https://community.mp3tag.de/t/ws-itunes/13478/22 "2012-07-08T06:02:51Z")

</div>

Hi pone,  
this is found in the iTunes store. Therefore I wanted it to tag with your srcipt but the script can't find it.  
[iTunes](http://itunes.apple.com/gb/album/complete-singles-as-bs-1953/id525419915)

---

<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: [July 10, 2012, 7:59pm UTC](https://community.mp3tag.de/t/ws-itunes/13478/23 "2012-07-10T19:59:14Z")

</div>

It's again the problem that the album is not in the US itunes store, only in the GB.

You can modify the script to get to other catalogs than the US catalog. For example to get the GB catalog, change the following two lines to appear like this:

[IndexUrl]=http://itunes.apple.com/search?term=%s&entity=album&limit=100 **&country=GB**  
[AlbumUrl]=http://itunes.apple.com/lookup? **country=GB&** id=

---

<div class="post-metadata">

### Author: ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)
#### Post date: [July 11, 2012, 5:54am UTC](https://community.mp3tag.de/t/ws-itunes/13478/24 "2012-07-11T05:54:20Z")

</div>

> [@pone](#):
>
> You can modify the script to get to other catalogs than the US catalog.

Thank you very much, pone.  
I had a look in the API documentary and noticed that there seem to be a lot of different national stores and you can define them with country ISO-codes.  
I tried DE and this album was found too.

Do you have any experience how much these stores differ and wether it makes any sense to define more special srcipt-versions for different country-stores?

---

<div class="post-metadata">

### Author: ![Link](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/dfb087/32.png) [@Link](https://community.mp3tag.de/u/Link)
#### Post date: [July 12, 2012, 11:43am UTC](https://community.mp3tag.de/t/ws-itunes/13478/25 "2012-07-12T11:43:25Z")

</div>

**2pone:**  
Thanks for the great script! Can you add 3 additional tag fields: TOTALTRACKS, DISCNUMBER, TOTALDISCS? And replace PUBLISHER tag with COPYRIGHT, as in the original songs from iTunes Store?

---

<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: [July 18, 2012, 7:00pm UTC](https://community.mp3tag.de/t/ws-itunes/13478/26 "2012-07-18T19:00:50Z")

</div>

@poster:  
I have no experience how much they differ. The only thing I can say is, there were about three questions here in the forum about problems with albums that could not be found because of that problem.  
So there seem to be quite a lot of these cases. I will make a package with 5 or more specific country scripts at the next update.

@Link:  
I can build in TOTALTRACKS.

If you want COPYRIGHT instead of PUBLISHER, you will have to edit the script yourself. I think PUBLISHER is more standard. But it's easy to chang for yourself. Upen the src fie in a text editor and change  
outputto "PUBLISHER"  
into  
outputto "COPYRIGHT"

Do DISCNUMBER and TOTALDISCS make sense for itunes? Are there any discs? I Only see digital download releases there.

---

<div class="post-metadata">

### Author: ![Link](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/dfb087/32.png) [@Link](https://community.mp3tag.de/u/Link)
#### Post date: [July 20, 2012, 9:13am UTC](https://community.mp3tag.de/t/ws-itunes/13478/27 "2012-07-20T09:13:31Z")

</div>

> [@pone](#):
>
> @Link:  
> I can build in TOTALTRACKS.
> 
> If you want COPYRIGHT instead of PUBLISHER, you will have to edit the script yourself. I think PUBLISHER is more standard. But it's easy to chang for yourself. Upen the src fie in a text editor and change  
> outputto "PUBLISHER"  
> into  
> outputto "COPYRIGHT"

Thanks, it works!

> [@pone](#):
>
> Do DISCNUMBER and TOTALDISCS make sense for itunes? Are there any discs? I Only see digital download releases there.

Yes, itunes has the "Disc number" field. It is useful for sorting of multi-disc albums.

---

<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: [July 20, 2012, 10:49am UTC](https://community.mp3tag.de/t/ws-itunes/13478/28 "2012-07-20T10:49:01Z")

</div>

> [@Link](#):
>
> Yes, itunes has the "Disc number" field. It is useful for sorting of multi-disc albums.

Don't confuse the mediaplayer itunes (your screenshot) with the download shop itunes (my script).

---

<div class="post-metadata">

### Author: ![Jonnyw2k](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/3be4f8/32.png) [@Jonnyw2k](https://community.mp3tag.de/u/Jonnyw2k)
#### Post date: [September 8, 2012, 11:17am UTC](https://community.mp3tag.de/t/ws-itunes/13478/29 "2012-09-08T11:17:46Z")

</div>

Hello,

Thank you for this script, I have some issues tho...  
The Album:  
[http://itunes.apple.com/gb/album/sound-dub...8?affId=1405655](http://itunes.apple.com/gb/album/sound-dubstep-darker-2-ministry/id549144458?affId=1405655)

Has 30 tracks on the UK iTunes site I am unable to check the US version as it wouldn't open in my browser and kept telling me to download iTunes.

But using the script it only has tags for the first 15 tracks.

* * *

OK I fixed it 🙂  
I changed the script to access the uk iTunes instead by changing 2 lines:

[IndexUrl]=http://itunes.apple.com/search?term=%s& **country=GB&** entity=album&limit=100  
[AlbumUrl]=http://itunes.apple.com/lookup? **country=GB&** id=

---

<div class="post-metadata">

### Author: ![AppleAddict](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/3ec8ea/32.png) [@AppleAddict](https://community.mp3tag.de/u/AppleAddict)
#### Post date: [September 14, 2012, 4:31pm UTC](https://community.mp3tag.de/t/ws-itunes/13478/30 "2012-09-14T16:31:43Z")

</div>

Hello, I'm a French Person and I would like to have the Web Sources Scripts for iTunes France please ! Thanks ![:rolleyes:](https://community.mp3tag.de/uploads/default/original/1X/3a79e8b0b7d169b30216785521d7c6f4f895c421.gif ":rolleyes:")

---

<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: [September 14, 2012, 6:23pm UTC](https://community.mp3tag.de/t/ws-itunes/13478/31 "2012-09-14T18:23:02Z")

</div>

You can modify the script to get to other catalogs than the US catalog. For example to get the iTunes France catalog, change the following two lines to appear like this:

[IndexUrl]=http://itunes.apple.com/search?term=%s&entity=album&limit=100 **&country=FR**  
[AlbumUrl]=http://itunes.apple.com/lookup? **country=FR&** id=

---

<div class="post-metadata">

### Author: ![AppleAddict](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/3ec8ea/32.png) [@AppleAddict](https://community.mp3tag.de/u/AppleAddict)
#### Post date: [September 15, 2012, 6:25am UTC](https://community.mp3tag.de/t/ws-itunes/13478/32 "2012-09-15T06:25:11Z")

</div>

> [@pone](#):
>
> You can modify the script to get to other catalogs than the US catalog. For example to get the iTunes France catalog, change the following two lines to appear like this:
> 
> [IndexUrl]=[http://itunes.apple.com/search?term=%s&entity=album&limit=100](http://itunes.apple.com/search?term=%25s&entity=album&limit=100) **&country=FR**  
> [AlbumUrl]=[http://itunes.apple.com/lookup?](http://itunes.apple.com/lookup?) **country=FR&** id=

Oh thanks, thanks !! You are awesome ! And why do you the release date from the music ! I would like to have the complete date on my Music please. (ex. Released: Apr 27, 2012)

---

<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: [September 15, 2012, 10:37am UTC](https://community.mp3tag.de/t/ws-itunes/13478/33 "2012-09-15T10:37:26Z")

</div>

> [@AppleAddict](#):
>
> And why do you the release date from the music ! I would like to have the complete date on my Music please. (ex. Released: Apr 27, 2012)

Because I want to keep this script simple. When I add a DATE tag-field, there will be new problems with releases where this information is not present or not completet. Furthermore there are different ways of date formates prefered by the users, I would have do make different script versions to fit all wishes. And I don't know what release dates itunes is displaying for old recordings. The release date of the first vinyl or CD release (which is the only thing which would be interessting), or the digital re-release date in the itunes store.

If you are keen on that you can experiment a little bit with that. I will help you to modify the script if I find some time. If it is working with all releases, maybe we can include that into the script.

---

<div class="post-metadata">

### Author: ![AppleAddict](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/3ec8ea/32.png) [@AppleAddict](https://community.mp3tag.de/u/AppleAddict)
#### Post date: [September 15, 2012, 11:21am UTC](https://community.mp3tag.de/t/ws-itunes/13478/34 "2012-09-15T11:21:20Z")

</div>

> [@pone](#):
>
> Because I want to keep this script simple. When I add a DATE tag-field, there will be new problems with releases where this information is not present or not completet. Furthermore there are different ways of date formates prefered by the users, I would have do make different script versions to fit all wishes. And I don't know what release dates itunes is displaying for old recordings. The release date of the first vinyl or CD release (which is the only thing which would be interessting), or the digital re-release date in the itunes store.
> 
> If you are keen on that you can experiment a little bit with that. I will help you to modify the script if I find some time. If it is working with all releases, maybe we can include that into the script.

Agree. Thank you for your message! But take your time. I am already satisfied with emplement MP3Tag! (P.S I use the latest version of iTunes)

---

<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: [September 16, 2012, 10:48am UTC](https://community.mp3tag.de/t/ws-itunes/13478/35 "2012-09-16T10:48:03Z")

</div>

> [@AppleAddict](#):
>
> Agree. Thank you for your message! But take your time. I am already satisfied with emplement MP3Tag! (P.S I use the latest version of iTunes)

Sorry Pone for barging in on your script but I've modified your script to the way I like it. This may be of help to you 'AppleAddict'.

Format as follows:  
**YEAR:** YYYY-MM-DD  
**DATE:** MMDD  
  
 **Added/changed lines of code (highlighted):**

#ALBUM

outputto "ALBUM"  
sayregexp "(?\<="collectionName":").+?(?=")" ", " "}"  
**# YEAR  
outputto "YEAR"  
sayregexp "(?\<="copyright":")\d\d\d\d(?=.)" ", " "}"**

 

regexpreplace "(\d\d\d\d),?" "\<\<\<year$1\>\>\>"  
findinline ""copyright":"" 1 1  
ifnot "\<\<\<year"

 

```
gotochar 1
sayregexp "(?<=\"releaseDate\":\"<<<year)\d\d\d\d(?=>>>)" ", " "}"
say "-"
sayregexp "(?<=>>>-)\d\d-\d\d(?=.)" ", " "}"

```

 

else

 

```
gotochar 1

```

 

endif

 
# DATE
 

**outputto "DATE"  
regexpreplace "\>\>\>-(\d\d)-(\d\d)" "\>\>\>-$1$2"  
sayregexp "(?\<=\>\>\>-)\d\d\d\d(?=.)"**

 
# PUBLISHER
 

outputto "PUBLISHER"  
regexpreplace "\<\<\<year\d\*\>\>\>" ""  
regexpreplace " +" " "  
sayregexp "(?\<="copyright":").+?(?=")" ", " "}"

 

I've also added a **WWW** field to it.  
e.g: [http://itunes.apple.com/us/album/dont-you-...dio/id559259832](http://itunes.apple.com/us/album/dont-you-worry-child-radio/id559259832)

 

**Added/changed lines of code (highlighted):**

 # COVER

outputto "COVERURL"  
sayregexp "(?\<="artworkUrl100":").+?(?=")" ", " "}"

 # WWW 

**outputto "WWW"  
sayregexp "(?\<="collectionViewUrl":").+?(?=?)" ", " "}"**

 
# ALBUMARTIST
 

outputto "ALBUMARTIST"  
sayregexp "(?\<="artistName":").+?(?=")" ", " "}"

 

It seems to work okay with no problems as yet.

---

<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: [September 16, 2012, 1:52pm UTC](https://community.mp3tag.de/t/ws-itunes/13478/36 "2012-09-16T13:52:19Z")

</div>

thanks stevehero, looks good.  
does it work for all releases? is the release date always present?

---

<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: [September 16, 2012, 2:01pm UTC](https://community.mp3tag.de/t/ws-itunes/13478/37 "2012-09-16T14:01:43Z")

</div>

Cheers, yeah everything works like a charm my end. I have yet to come across a release date yet (unless other people have) that has been missing.

As long as people remember to put the bits in the right places like I have in the above post then everyone should have no problem.

---

<div class="post-metadata">

### Author: ![peteyt](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/779978/32.png) [@peteyt](https://community.mp3tag.de/u/peteyt)
#### Post date: [September 17, 2012, 12:39am UTC](https://community.mp3tag.de/t/ws-itunes/13478/38 "2012-09-17T00:39:29Z")

</div>

Just wanted to say a big thanks been using this script for a bit now and it helps a lot saving time.

---

<div class="post-metadata">

### Author: ![Moshi](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/f07891/32.png) [@Moshi](https://community.mp3tag.de/u/Moshi)
#### Post date: [September 30, 2012, 7:26pm UTC](https://community.mp3tag.de/t/ws-itunes/13478/39 "2012-09-30T19:26:58Z")

</div>

> [@pone](#):
>
> You can modify the script to get to other catalogs than the US catalog. For example to get the iTunes France catalog, change the following two lines to appear like this:
> 
> [IndexUrl]=[http://itunes.apple.com/search?term=%s&entity=album&limit=100](http://itunes.apple.com/search?term=%25s&entity=album&limit=100) **&country=FR**  
> [AlbumUrl]=[http://itunes.apple.com/lookup?](http://itunes.apple.com/lookup?) **country=FR&** id=

Is only one country possible?

---

<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: [September 30, 2012, 8:54pm UTC](https://community.mp3tag.de/t/ws-itunes/13478/40 "2012-09-30T20:54:53Z")

</div>

> [@Moshi](#):
>
> Is only one country possible?

I guess so.  
But you can make different versions of the script for different countries. Use a different filename for each one!

[Previous page](https://community.mp3tag.de/t/ws-itunes/13478.md?page=1)

[Next page](https://community.mp3tag.de/t/ws-itunes/13478.md?page=3)
