Page 1 of 1

uk.imdb.com

Posted: Sat Feb 21, 2009 3:13 pm
by markjewiss
Hi there,

First off, I'm a big time fan of the pedia apps - have them all, and slowly working my way through adding everything in! :)

A couple of quick questions about DVDPedia - is there a way to get information from uk.imdb.com instead of imdb.com (I'm assuming that the app currently gets data from the US version of the imdb.com site). I want to make the change, as being a UK user there are the odd differences, such as rating. If there isn't anything built in, I'm guessing it should be relatively easy to change the imdb.com plug-in to use the UK site, but I don't know how to do that. I've taken a look through all of the files in the plug-in, but can't find a referenced URL that I could change, so I guess I'd need to get my hands dirty. Ca I get some hints and tips in the right direction please?

Many thanks,

Mark.

Re: uk.imdb.com

Posted: Sun Feb 22, 2009 4:47 am
by Conor
Hi Mark,

Very happy that you are finding all the pedias so useful. The IMDb plug-in does indeed use the US site. The plug-in is already compiled so you have to use the source code for the plug-in. Look for "http://imdb.com" this is where you have to prefix it to change it to "http://uk.imdb.com" inside the file imdb.m. To compile set the configuration to release and build, afterwards replace the old plug-in in the program with the newly created version.

In the case that you don't have Xcode installed I have gone ahead and done that for you. Download the plug-in unzip and replace for the current version inside the program. You can also place it in ~/Library/Application Support/DVDpedia/Plug-ins so that it does not get replaced by DVDpedia updates, but you still have to remove the one inside the program (because they are named the same DVDpedia prefers the internal one).

Setting up Xcode and learning to build a Cocoa plug-in can take a while, but means you have access to everything in the plug-in and can do even more customization.

Re: uk.imdb.com

Posted: Sun Feb 22, 2009 5:30 am
by markjewiss
Thanks Conor. I've always been impressed by how quickly you guys respond to things in the forum!

I've taken your new version, and put it in the right place, but it still sources an 'R' rating for a movie if I add a new film. I probably have it in the wrong place. I've had Xcode installed for some time, but never used it - I can write Perl, some JS and SQL, but never needed to go to Xcode before. I will give it a try.

Thanks once again,

Mark.

Re: uk.imdb.com

Posted: Sun Feb 22, 2009 5:43 am
by kbarnes70
Conor wrote:Hi Mark,

Very happy that you are finding all the pedias so useful. The IMDb plug-in does indeed use the US site. The plug-in is already compiled so you have to use the source code for the plug-in. Look for "http://imdb.com" this is where you have to prefix it to change it to "http://uk.imdb.com" inside the file imdb.m. To compile set the configuration to release and build, afterwards replace the old plug-in in the program with the newly created version.

In the case that you don't have Xcode installed I have gone ahead and done that for you. Download the plug-in unzip and replace for the current version inside the program. You can also place it in ~/Library/Application Support/DVDpedia/Plug-ins so that it does not get replaced by DVDpedia updates, but you still have to remove the one inside the program (because they are named the same DVDpedia prefers the internal one).

Setting up Xcode and learning to build a Cocoa plug-in can take a while, but means you have access to everything in the plug-in and can do even more customization.
Conor, Hi again.

This is something I always wanted too, for the same reasons as Mark. But as you know, I use the IMDBSpecial that also brings the Composer and Cinematographer into the main Info pane. Would it be too much to ask if you could make a UK version of IMDbSpecial for me? I could try for the rest of my life with Xcode or whatever and never get it right. I know you must be really busy but If you have time, I'd appreciate it. If not, no problem.

Kindest regards,

Keith

Re: uk.imdb.com

Posted: Sun Feb 22, 2009 5:49 am
by kbarnes70
markjewiss wrote:Thanks Conor. I've always been impressed by how quickly you guys respond to things in the forum!

I've taken your new version, and put it in the right place, but it still sources an 'R' rating for a movie if I add a new film. I probably have it in the wrong place. I've had Xcode installed for some time, but never used it - I can write Perl, some JS and SQL, but never needed to go to Xcode before. I will give it a try.

Thanks once again,

Mark.
Hi Mark - I've requested a version for the UK too. To make it work you MUST first delete the imdb plug-in from inside the app (right click on the dvdpedia app and then show package contents, find it and delete it. Then you can either place your custom plug-in inside the app or in the Application Support folder as Conor suggests. You will have to remember to delete the standard one from the main app every time you update DVDpedia though. HTH.

Thanks for asking Conor for a UK version BTW. I've asked him for so much (and he has always responded so quickly) that I didn't like to ask for something else again so soon, so your request came just at the right time :) HST, I have *still* asked him for something else (Sorry Conor!) because I use a special version of the IMDb plug-in that also puts Composer and Cinematographer in the main info pane (works in conjunction with the useful Awards plug-in which you can download from the Extras page.

What a great program with the *best* support isn't it!

Kind regards,

Keith

Re: uk.imdb.com

Posted: Sun Feb 22, 2009 8:40 am
by markjewiss
kbarnes70 wrote:Hi Mark - I've requested a version for the UK too. To make it work you MUST first delete the imdb plug-in from inside the app (right click on the dvdpedia app and then show package contents, find it and delete it. Then you can either place your custom plug-in inside the app or in the Application Support folder as Conor suggests. You will have to remember to delete the standard one from the main app every time you update DVDpedia though. HTH.
Hey Keith,

Have done that - I've tried it both in my home directory Library, and also directly in the application plug-ins directory, but I still see American ratings when I add a new entry. But now...

Having actually *looked* at uk.imdb.com, I can see that the main rating (labelled up as 'MPAA') shows an R - the 'international' ratings are tagged somewhere else lower down the page. So it's me, and what I'm expecting the data to be, as opposed to the data that is actually available and fetched. I will take a look at the Xcode stuff at some point, and see what I can work out. Part of me thinks it would be cool to pull out the Fun Stuff category from that page, and also get details on the awards that something has been nominated for.

If I get anywhere, I'll of course make it available so it can go on the bruji.com site (if they want it! ;) ).

MJ.

Re: uk.imdb.com

Posted: Sun Feb 22, 2009 10:19 am
by kbarnes70
markjewiss wrote:
kbarnes70 wrote:Hi Mark - I've requested a version for the UK too. To make it work you MUST first delete the imdb plug-in from inside the app (right click on the dvdpedia app and then show package contents, find it and delete it. Then you can either place your custom plug-in inside the app or in the Application Support folder as Conor suggests. You will have to remember to delete the standard one from the main app every time you update DVDpedia though. HTH.
Hey Keith,

Have done that - I've tried it both in my home directory Library, and also directly in the application plug-ins directory, but I still see American ratings when I add a new entry. But now...

Having actually *looked* at uk.imdb.com, I can see that the main rating (labelled up as 'MPAA') shows an R - the 'international' ratings are tagged somewhere else lower down the page. So it's me, and what I'm expecting the data to be, as opposed to the data that is actually available and fetched. I will take a look at the Xcode stuff at some point, and see what I can work out. Part of me thinks it would be cool to pull out the Fun Stuff category from that page, and also get details on the awards that something has been nominated for.

If I get anywhere, I'll of course make it available so it can go on the bruji.com site (if they want it! ;) ).

MJ.

Hi Mark - you know there is already an Awards plug-in? On the Bruji extras page. If you do make a plug-in that pulls more of the 'fun stuff; off the Imdb pages, then please do post it. I'd love that - but I can't program the washing machine let alone some software :)

Cheers,

Keith

Re: uk.imdb.com

Posted: Mon Feb 23, 2009 7:02 am
by Conor
What you mention is true the UK certification is listed elsewhere. The plug-in needs to be modified to get the UK certification as the MPAA rating still appears and this is what the plug-in pick up. Here is the same plug-in updated to pick up the UK rating (since Keith asked it's the composer cinematographer version of the plug-in. You can delete that information with edit multiple after adding several movies or use Xcode to modify your own version.)

Since you mention Xcode here is the code I added for the UK certification, so that you can see what is possible with a few changes. This would need to be added after it searches for the MPAA rating as otherwise that would overwrite the rating:

Code: Select all

                // Get UK rating
		tempString = [results stringBetween:@"?certificates=gb" and:@"</"];
		tempString = [tempString stringBetween:@">" and:@"</"];  // remove the HTML
		tempString = [tempString stringBetween:@":" and:@"</"]; // Remove the UK: prefix
		if (tempString) {
			[resultsDict setValue:tempString forKey:@"rated"];
		}

I been meaning to create bridges to other languages so that it's more accessible, so far I only have an AppleScript bridge, but hope to add Perl, Python and others some day.

Re: uk.imdb.com

Posted: Fri Mar 06, 2009 6:41 am
by markjewiss
Sorry for the long delay in replying, work is just getting in the way too much these days :(

Have downloaded and installed the updated IMDB plugin - thanks again Connor.

Will be trying to take a look at the XCode this weekend...

MJ.

Re: uk.imdb.com

Posted: Sat Mar 27, 2010 7:24 pm
by maxycatz
Just of note regards the source code for the IMDB plugin and the the above details:

www.imdb.com film pages now hold the UK Certification details in 'certificates=gb' not 'certificates=UK'; so, the coding needs to be changed to:

tempString = [results stringBetween:@"?certificates=gb" and:@"</"];

Regards,