# \[WS\] imdb

**URL:** https://community.mp3tag.de/t/ws-imdb/9299
**Category:** Web Sources Scripts
**Created:** [November 10, 2009, 9:23am UTC](https://community.mp3tag.de/t/ws-imdb/9299 "2009-11-10T09:23:40Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [November 10, 2009, 9:23am UTC](https://community.mp3tag.de/t/ws-imdb/9299/1 "2009-11-10T09:23:40Z")

</div>

**Mp3tag v2.45 mandatory**

[How do I install the script?](https://community.mp3tag.de/t/2748/1) / [Wie installiere ich das Script?](https://community.mp3tag.de/t/2749/1)

**imdb**

> Tag movies or tv shows with mp4 container.

**Scripts:**

> imdb#Search Movies imdb#Search TV Episodes imdb#URL imdb id

**Imported Tags:**
- Standard: Artist, Album, Title, Year, Comment, Composer, Cover
- Custom: Releasedate, Airdate, Cast, Language, Rating, IMDB Id, Country
- iTunes supported: Releasetime, ITUNESMEDIATYPE, Subtitle, ITUNESPODCASTDESC, TVEpisode, TVSeason, TVShow

> **## Scroll down for updates ##**

---

<div class="post-metadata">

### Author: ![morrison](https://community.mp3tag.de/user_avatar/community.mp3tag.de/morrison/32/203_2.png) [@morrison](https://community.mp3tag.de/u/morrison)
#### Post date: [November 10, 2009, 3:40pm UTC](https://community.mp3tag.de/t/ws-imdb/9299/2 "2009-11-10T15:40:55Z")

</div>

Good news

Perhaps in the future will be possible to get info for all formats and save them in separate xml files? Excellent.

---

<div class="post-metadata">

### Author: ![edrikk](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/c37758/32.png) [@edrikk](https://community.mp3tag.de/u/edrikk)
#### Post date: [March 31, 2010, 2:17pm UTC](https://community.mp3tag.de/t/ws-imdb/9299/3 "2010-03-31T14:17:04Z")

</div>

In case anyone is interested, the following (when added to end of the Movie script) should get you the MPAA Certification (which will show up in iTunes).

Please note that because (as far as I can tell) the scripting language does not support writing the pipe ("|") symbol (can't even be escaped to get it in), you have to run an action after the fact to replace the "@" symbol with an "|" for iTunEXTC.

```
# Cert
findline "USA:" 1 1
unspace
if "USA:"
    movechar 4
     outputto "iTunEXTC"
    
    replace "|" ""
    replace " " ""
        replace "USA:G" "mpaa@G@100@"
        replace "USA:PG-13" "mpaa@PG-13@300@"
        replace "USA:PG" "mpaa@PG@200@"
        replace "USA:R" "mpaa@R@400@"
        replace "USA:NC-17" "mpaa@NC-17@500@"
        replace "USA:Unrated" "mpaa@Unrated@???@"
        replace "USA:Approved" "mpaa@PG-13@300@"
        replace "USA:Passed" "mpaa@PG-13@300@"
        replace "USA:NotRated" "mpaa@Not Rated@000@"
        replace "USA:TV-MA" "us-tv@TV-MA@600@"
        replace "" "mpaa@Not Rated@000@"
        sayuntil "</a>"
else
    outputto "iTunEXTC"
        say "mpaa@Not Rated@000@"
        findline "<html>" -1
endif

```

Also, I think iTunes may have some problems with the fact that MP3Tag writes the iTunEXTC tag in all upper case... So I have created (as part of the "@" to "|" Action) a rule that properly re-writes the tag:

Replace with regular Expression  
\_FIELDNAME  
ITUNEXTC  
iTunEXTC

---

<div class="post-metadata">

### Author: ![edrikk](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/c37758/32.png) [@edrikk](https://community.mp3tag.de/u/edrikk)
#### Post date: [August 31, 2010, 7:54pm UTC](https://community.mp3tag.de/t/ws-imdb/9299/4 "2010-08-31T19:54:55Z")

</div>

I have attached an updated IMDB web source script for IMDB, which meets my needs for "all the metadata that I can get"... 🙂

In addition, I have attached 3 Actions which should be run on the file(s) in question, AFTER the web script has been run to complete the "work".

Download the web script  
Place the script in: %appdata%\mp3tag\data\sources

- Download the 3 action files "Finish Setting Video Tags.mta" and "Fix Tag Case (iTunEXTC, etc).mta" and "Find bad plist.mta"

- Copy the files to directory:  
%appdata%\Mp3tag\data\actions

I recommend running the actions in this order (so place them in the actions dialog of MP3Tag in this order):

1. Find Bad Plist (in case the script screwed up, and the plist is broken)
2. Finish Setting Video Tags (copies information to other relevant tags
3. Fix Tag Case (so for example, ITUNEXTC becomes iTunEXTC)

The web script as it stands pull and populates/stores the following data in your mp4 file:

- Artists ("/" delimited)

- Genre (the first non-"Drama". If only "Drama" exists, use it)

- Composer (i.e. writters, "/" delimited)

- IMDB ID

- IMDB Rating

- Director ("/" delimited)

- Producer ("/" delimited)

- ReleaseDate

- MPAA Rating and REASON (stored in iTunEXTC. Reason is not used anywhere yet AFAIK).

- Description

- Tagline

- IMDB Keywords

- iTunMOVI (which Apple TV etc uses), containing:

- Studio
- Screenwriters
- Directors
- Producers
- Cast

Given a couple of limitations/bugs in mp3tag, you have then then create and run the following action on the file AFTER running the web script:

- Right click on the file you just ran the script on, and select: "Convert" and then "Actions"

- Make sure only "Finish Setting Video Tags" and "Fix Tag Case (iTunEXTC, etc)" and "Find bad plist" have their checkboxes "checked", and are in the order that I originally mentioned at the top of this post.

- Click "Ok"

Hope this helps people.

\<\<EDIT: "Country" was a little finiky, so I removed it... Makes the script more stable overall...\>\>

[imdb\_web\_source\_and\_actions.zip](https://community.mp3tag.de/uploads/default/original/2X/b/b9d478677fbbf189c156e8f9509cbc2be531eb94.zip) (3.84 KB)

---

<div class="post-metadata">

### Author: ![edrikk](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/c37758/32.png) [@edrikk](https://community.mp3tag.de/u/edrikk)
#### Post date: [October 12, 2010, 5:04pm UTC](https://community.mp3tag.de/t/ws-imdb/9299/5 "2010-10-12T17:04:26Z")

</div>

I have updated the script to correct an issue with updated IMDB format (for example, previously you could type in the ttXXXXXX number from IMDB into the search box, but the IMDB changes broke that... This has been corrected.

Also, I have added an action which you may or may not want to use... This action ("Set iTunesHD") sets the iTunes HD flag, if the file size is greater than 1400 MB. That's the only check, as that's all the MP3Tag provides... So yes, even a non-HD video could be tagged as HD. Use if you are fine with that, ignore that action if you don't like it...

[EDIT: Note that you need version 2.46c or newer for this version (unless you don't use the HD action]

[imdb\_web\_source\_and\_actions.zip](https://community.mp3tag.de/uploads/default/original/2X/c/c0f4b3cabfe4448bfe1670abd4ed593d96dc2e3c.zip) (4.13 KB)

---

<div class="post-metadata">

### Author: ![edrikk](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/c37758/32.png) [@edrikk](https://community.mp3tag.de/u/edrikk)
#### Post date: [October 29, 2010, 5:34pm UTC](https://community.mp3tag.de/t/ws-imdb/9299/6 "2010-10-29T17:34:44Z")

</div>

Updated to work with the field name changes introduced in version 2.46d of MP3Tag.  
Will not work with versions earlier than 2.46d

[imdb\_web\_source\_and\_actions\_2.46d.zip](https://community.mp3tag.de/uploads/default/original/2X/3/30c78b2f40eb1ccf77a7186cfcdcab357d3e32ee.zip) (4.11 KB)

---

<div class="post-metadata">

### Author: ![edrikk](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/c37758/32.png) [@edrikk](https://community.mp3tag.de/u/edrikk)
#### Post date: [January 30, 2011, 1:26pm UTC](https://community.mp3tag.de/t/ws-imdb/9299/7 "2011-01-30T13:26:56Z")

</div>

A small update, and note:

1. You might notice that the script sometimes gives errors when you search IMDB by name, and if the name is a direct hit. In this case, I recommend that you simply enter the IMDB ID in the search box (easiest way to find the IMDB ID is to "ttXXXXXX" part of the IMDB URL of the video.
2. I have modified the actions so that the ALBUMARTIST is now the first artist listed in IMDB. Previously, the same value as the ARTIST tag was used (full list). 
3. I have included an extra Web Source which uses the Apple Web Services to retrieve the CATALOGID tag. This is a bit "janky" at the moment, so use your judment to ensure it is the correct one. To help in ensuring the number is the correct one, the name of the video from the source is also returned.

[imdb\_web\_source\_and\_actions\_2.48.zip](https://community.mp3tag.de/uploads/default/original/2X/f/fb4bada0478f563c0fafb10146077c8296d0aa4a.zip) (4.77 KB)

---

<div class="post-metadata">

### Author: ![edrikk](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/c37758/32.png) [@edrikk](https://community.mp3tag.de/u/edrikk)
#### Post date: [February 1, 2011, 5:20pm UTC](https://community.mp3tag.de/t/ws-imdb/9299/8 "2011-02-01T17:20:11Z")

</div>

Quick update.  
Exactly the same as the previous item, just fixed the Apple Web Script to make it not "janky"...

[imdb\_web\_source\_and\_actions\_2.48.zip.zip](https://community.mp3tag.de/uploads/default/original/2X/1/1628c1e403705a9a9002c12a387e65c205e0bae6.zip) (5 KB)

---

<div class="post-metadata">

### Author: ![edrikk](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/c37758/32.png) [@edrikk](https://community.mp3tag.de/u/edrikk)
#### Post date: [May 26, 2011, 12:56am UTC](https://community.mp3tag.de/t/ws-imdb/9299/9 "2011-05-26T00:56:52Z")

</div>

Updated for version 2.48e.  
Please note that for some of the tags to work "properly" (e.g. Rate, Keyword), version 2.48e or higher of mp3tag must be used.

Additions / Changes:

1. Using the new "\_video\_width" property to set iTunesHD flag if the width is greater or equal to 1280. Previously (without this attribute being present), the file size was used to set the flag (as a guess, which could easily be incorrect).
2. The new "Rate" tag is set based on the IMDB Rating. This value is out of "100" so if the imdb rating is "8.2/10" the value will be "82"
3. The new "Kewords" tag is set to the keywords found in IMDB

[Edit] As an FYI, as mentioned in previous threads, I find that using the IMDB ID as the search criteria is the most fail proof means of using the script. [/edit]

[imdb\_web\_source\_and\_actions\_2.48e.zip](https://community.mp3tag.de/uploads/default/original/2X/2/245db04259c96eb072f268db8f85f92dad0e8516.zip) (5.07 KB)

---

<div class="post-metadata">

### Author: ![edrikk](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/c37758/32.png) [@edrikk](https://community.mp3tag.de/u/edrikk)
#### Post date: [January 6, 2012, 6:51pm UTC](https://community.mp3tag.de/t/ws-imdb/9299/10 "2012-01-06T18:51:32Z")

</div>

A small update...

Addition:

1. The SUBTITLE tag will now be populated, and also contains the same description as that which is in PODCASTDESC.

[imdb\_web\_source\_and\_actions\_2.48e\_20120106.zip](https://community.mp3tag.de/uploads/default/original/2X/d/df73378251784a90e3131d9e0f9329ded0c85888.zip) (5.3 KB)

---

<div class="post-metadata">

### Author: ![edrikk](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/c37758/32.png) [@edrikk](https://community.mp3tag.de/u/edrikk)
#### Post date: [April 24, 2012, 4:17pm UTC](https://community.mp3tag.de/t/ws-imdb/9299/11 "2012-04-24T16:17:44Z")

</div>

A few changes - Note that version 2.50 is required to run the script:

- Use the new $verticalbar() function in the Web Source (for iTunEXTC tag)
- As part of the Actions, if the "iTunMovi" atom has value '7:720p' within it (the default value set in the Web Source), the Action will update to 720p or 480p based on video width
- As part of the Actions, if the "iTunMovi" atom has the 'high-definition' key within it (the default value set to 'true' in the Web Source), the Action will update to true/false based on video width
- Take into account, and set the new 1080i/p value of hdvd (which is 2).

PS. If you've tagged old videos using previous version, simply running the Actions on the files again will update the relevant tags.

[imdb\_web\_source\_and\_actions\_2.50\_20120424.zip](https://community.mp3tag.de/uploads/default/original/2X/9/911e4f784ed799d0d53bb9358e4fc6152ae76fb9.zip) (5.56 KB)

---

<div class="post-metadata">

### Author: ![boundless](https://community.mp3tag.de/user_avatar/community.mp3tag.de/boundless/32/11479_2.png) [@boundless](https://community.mp3tag.de/u/boundless)
#### Post date: [October 21, 2012, 11:54am UTC](https://community.mp3tag.de/t/ws-imdb/9299/12 "2012-10-21T11:54:19Z")

</div>

> [@edrikk](#):
>
> I have attached an updated IMDB web source script for IMDB, which meets my needs for "all the metadata that I can get"... 🙂
> 
> In addition, I have attached 3 Actions which should be run on the file(s) in question, AFTER the web script has been run to complete the "work".

Thanks for this script, maybe I can test them out on some of my mistagged for trakt TV shows on my XBMC TV-Show playlist.... 🙂

---

<div class="post-metadata">

### Author: ![edrikk](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/c37758/32.png) [@edrikk](https://community.mp3tag.de/u/edrikk)
#### Post date: [December 11, 2012, 3:14pm UTC](https://community.mp3tag.de/t/ws-imdb/9299/13 "2012-12-11T15:14:38Z")

</div>

Update to IMDB scraper due to IMDB page re-designs.

[imdb\_web\_source\_and\_actions\_2.50\_20121211.zip](https://community.mp3tag.de/uploads/default/original/2X/3/3597e9f7942c7c83485443b2d902bcb69881da17.zip) (5.56 KB)

---

<div class="post-metadata">

### Author: ![CyberDemon](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/c67d28/32.png) [@CyberDemon](https://community.mp3tag.de/u/CyberDemon)
#### Post date: [January 4, 2013, 7:46am UTC](https://community.mp3tag.de/t/ws-imdb/9299/14 "2013-01-04T07:46:34Z")

</div>

Edrikk,  
This is a very nice script, thanks for your work keeping it well maintained. Your work has inspired me to build my own revision based heavily on your design.

I have included my script in this post so that you may take from it any features you like.

I added a new column in the search results window that displays the type of result. (Movie, TV Show, Game etc.)

I've also added several tags as well as image scraping/tagging to this script.

Thanks again for all your work on this script, I hope you find my additions as useful as I've found your script. 🙂

CyberDemon

[IMDB\_\_iTunes\_mp4\_\_mp3tag\_Web\_Source\_Script.zip](https://community.mp3tag.de/uploads/default/original/2X/8/89ad98c29792e5d0f569b1cbcb6d17d22c129e68.zip) (3.56 KB)

---

<div class="post-metadata">

### Author: ![niconic](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/n/ed8c4c/32.png) [@niconic](https://community.mp3tag.de/u/niconic)
#### Post date: [September 19, 2013, 5:06pm UTC](https://community.mp3tag.de/t/ws-imdb/9299/15 "2013-09-19T17:06:54Z")

</div>

This is a great script and does exactly what I want it to, however it seems The Actors (cast) and Director fields doesn't apply to the mp4 file when I run the script.

Any suggestions would be helpful. Here is what I am using from CyberDemon, Edrikk and Dano's scr. Do I need to adjust the code?

```
	### Directors ###
		findline "<html" -1
		findline "<h5>Director" 1 1
		unspace
		if "<h5>Director"
			#Save Directors
			outputto "Director"
			joinuntil ""
		sayregexp "(?<=;\">)[^<]+(?=<)" ", "
		
		# Append Directors to iTunMOVI
		outputto "iTunMOVI"
		say "<key>directors</key><array><dict><key>name</key><string>" 
		joinuntil "</div>"
		sayoutput "Director"
		say "</string></dict></array>"
		saynewline
	endif

### Actors ###
	findline "<html" -1
	findline "<h3>Cast</h3>" 1 1
	if "<hr/>"
		#Save Actors
		outputto "Artist"
		sayregexp "(?<=(/|;)\">)[\s\S]{1,50}(?=</a></td><td\sclass=\"ddd\">)" ", " "</table>"
		
		# Append Directors to iTunMOVI
		outputto "iTunMOVI"
		say "<key>cast</key><array><dict><key>name</key><string>"
		sayoutput "Artist"
		say "</string></dict></array>"
		saynewline
	endif
	
### Close iTunMOVI XML ###
	outputto "iTunMOVI"
	say "</dict>"
	saynewline
	say "</plist>"
	saynewline</div>
```

---

<div class="post-metadata">

### Author: ![glenndar](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/dbc845/32.png) [@glenndar](https://community.mp3tag.de/u/glenndar)
#### Post date: [June 12, 2015, 12:09pm UTC](https://community.mp3tag.de/t/ws-imdb/9299/16 "2015-06-12T12:09:24Z")

</div>

Hi there  
Hoping that someone can help with this enquiry  
I have used the scripts successfully in the current version of MP3tag however I am trying to work out how to extend the number of characters in the Plot/Description field.

######### Plot  
findline "\<html" -1  
findline "

##### Plot:" 1 1 unspace if "

##### Plot:" outputto "podcastdesc" moveline 2 sayuntil "\<a" else findline "\<html" -1 endif

When I use this scripts it cuts off the end of the description (from Steel Magnolias movie):  
"Revolving around Truvy's Beauty Parlor in a small parish in modern-day Louisiana, STEEL MAGNOLIAS is..."

How can I fix this?  
Any help would be greatly appreciated.  
Thanks

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [June 15, 2015, 4:33am UTC](https://community.mp3tag.de/t/ws-imdb/9299/17 "2015-06-15T04:33:21Z")

</div>

> [@glenndar](#):
>
> ...  
> When I use this scripts it cuts off the end of the description (from Steel Magnolias movie):  
> "Revolving around Truvy's Beauty Parlor in a small parish in modern-day Louisiana, STEEL MAGNOLIAS is..."

If you look at the source code of the page then you find that the plot description does not exist in more detail on that page but links to a separate page... so unless you find a way to open that separate page, you are stuck with the short description.
