Author Topic: Imdb Images Version 1.1 Last Version for a while  (Read 24009 times)

0 Members and 4 Guests are viewing this topic.

mgpw4me@yahoo.com

  • Guest
Imdb Images Version 1.1 Last Version for a while
« on: January 18, 2010, 09:16:27 pm »
Version 1.1 is the last version of this script until the scripting environment is enhanced.

Version 1.01
fixes a bug in the people url, and allows the script to run in silent mode by updating the silent mode setting.

Version 1.1
- adds the ability to set the image width AND height to a single value.  Set the IMAGE_SIZE_X and IMAGE_SIZE_Y values in the script to the same value, and a square image will be returned...with whitespace to pad the dimension that is shorter.
- if there are multiple gallery pages for a person, the image selection dialog will start with a list of gallery pages you can visit followed by the images of the gallery you are on.  You can move freely from one gallery to the next, but can only load a single image.



This script will download large images from IMDB.  

There are known problems:
1) DOWNLOADED IMAGE WILL REPLACE EXISTING IMAGES
2) It only operates in USER MODE.  If you run it in SILENT MODE it will not download any images.
3) Multiple image downloads are not yet supported.  It downloads the first 'checked' image in the selection box.
4) Images cannot be scaled to a maximum width AND height at the same time.

While work is in progress to resolve these issues, the script is somewhat usable, so here it is.  

** USER CONFIGURATION **
You can use the default settings or update the USER CONFIGURATION section of the script.
IMAGE_SIZE_X      DEFAULT: 600        OTHER OPTIONS: enter the maximum width of the image
IMAGE_SIZE_Y      DEFAULT: 0           OTHER OPTIONS: enter the maximum height of the image
DEBUG                 DEFAULT: False      OTHER OPTIONS: True
SILENT_MODE       DEFAULT: False      OTHER OPTIONS: True

By default, the script will download images up to 600px wide, scaling larger images to 600px wide using the correct aspect ratio.  Smaller images will not be upscaled.  If IMAGE_SIZE_X is larger than IMAGE_SIZE_Y, the WIDTH will determine the size of the image.  When IMAGE_SIZE_Y is the larger, the HEIGHT will be used.

Please report problems and suggestions in this forum.

[attachment deleted by admin]
« Last Edit: January 23, 2010, 02:18:08 am by mgpw4me@yahoo.com »

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Imdb Images
« Reply #1 on: January 18, 2010, 10:47:47 pm »
Seems to work well—as described.

It seems doubtful, but...might it be possible to include any textual information in the selection dialog ("gallery"?)? It would be helpful to see the IMDb classification (type and title) and original size (from the filename suffix?).
« Last Edit: January 19, 2010, 02:05:33 am by rick.ca »

mgpw4me@yahoo.com

  • Guest
Re: Imdb Images
« Reply #2 on: January 18, 2010, 11:13:03 pm »
It seems doubtful, but...might it be possible to include any textual information in the selection dialog ("gallery"?)? It would be helpful to see the IMDb classification (type and title) and original size (from the filename suffix?).

The title information is indeed useful.  It's a shame we don't have an 'image tagging' system in place to save such info.  It would probably be messy for Nostra to set up in the scripting environment, but it really would be nice.  I don't know of a way to select information for the specific images chosen.  I could save all the data in a custom field, but I don't think that improves the situation.

If I can figure out how to include this information in the selection dialog, I will.  For now, if I do that, it will add all the selected images into new person records with the same name as the title.  That's one messy way to get multiple images to download, eh?

The 'real' image size isn't actually known.  From what I can see, IMDB just adds the sizing parameters to the image to accommodate their page layout.

I also forgot to mention that I only parse the first page of images...48 images maximum.
« Last Edit: January 19, 2010, 02:05:48 am by rick.ca »

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Imdb Images
« Reply #3 on: January 19, 2010, 02:04:03 am »
Quote
If I can figure out how to include this information in the selection dialog, I will.

The selection dialog is all I was thinking of, although I suppose it would be nice to be able to capture such information in the database. Image tooltips would be cool. Remember, however, we don't yet have the ability to create custom fields in people records.

Quote
For now, if I do that, it will add all the selected images into new person records with the same name as the title.

That would be an interesting violation of the fundamental database structure. But of what use would it be? Something like this would be more applicable in a movie script—like one which finds shots of an actor selected in movie credits and puts the selected images in the movies screen shot container.

Is this just your thought about how to get multiple photos associated with one movie, or is there some more general difficulty in downloading multiple images? I would think the first step is to get the selection dialog working as it appears to be intended—to allow the selection of one, all or a selection of the available photos.

Quote
I also forgot to mention that I only parse the first page of images...48 images maximum.

Do you have any sense of how they're organized? They're not random, it's unlikely the "best" or most popular ones are being put on the first page, so this restriction is going to be a problem. The very thing being sought (e.g., the best head shots, screen shots from a particular movie) may be excluded. At the same time, the initial download will take too long if not restricted (BTW, 48 seems to work well in this regard). Can you include a "next page" button or link? That would provide a convenient way of searching further—if necessary.

mgpw4me@yahoo.com

  • Guest
Re: Imdb Images
« Reply #4 on: January 19, 2010, 02:51:51 am »
The incorrectly named image records is the reason I can't add title information to the selection dialog at the moment.  I'll try to find a solution, but I'm also trying to get my 'a' list people updated so I can see what the difference is.  My first 100 shows 28 (!!) images now...11 more than last time I looked.  At that rate I'll have over 16,000 images just from IMDB.

Check out 'Jane Fonda' and tell me the pages aren't organized  ;D....my favorite space girl.  Paging built into the selection dialog would be best, but I don't know if it is.  Other than that I could build a paging system, but don't know if I could append images to the stream...or if I could send multiple streams without overwriting previous streams.  Testing required unless Nostra can provide insight.

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Imdb Images
« Reply #5 on: January 19, 2010, 03:49:04 am »
Quote
my 'a' list people

That's an interesting reference. Do you have a way of actually designating such a list? I keep thinking it might be a good idea to use Rating to distinguish people I'm really interested in or otherwise merit special attention. But the idea of manually rating a few thousand out of 25,000 people stops me. I wish there were some way to flag all actors who have a "starring role" in at least one movie in my collection, or which appear multiple times, etc.

Quote
Check out 'Jane Fonda' and tell me the pages aren't organized

Right. Jane as Barbarella next to recent "event" photos indicates some kind of organization. At least it offers a clear choice. ;)

Quote
...or if I could send multiple streams without overwriting previous streams.

Right—I didn't think of that. But it wouldn't be so bad if you can only select from one page at a time—especially if you're only looking for one good photo. With that in mind, navigation back to the previous page is also in order.

mgpw4me@yahoo.com

  • Guest
Re: Imdb Images
« Reply #6 on: January 19, 2010, 04:06:14 am »
'a' list was meant alphabetically, but now that you mention it.  A number of sites that I want to script have only 'famous' and 'young' celebrities.  My thought on this was to use a script to access the filmography...starring roles wouldn't be there, BUT knowing that a person had worked in 20 or 30 ventures over a 5 year period would indicate some sort of success.  More so a role in a TV series that runs over several seasons.

Such a script could certainly save the data...got a 'people' field you don't use?  I note there is a 'rating' for people in the sort list.  A weighted (movies vs TV) list could probably built and scripted pretty quickly.  Script access appears to be no problem:

pfRating = 8;

I could see a couple of factors playing a role in a rating system...

Number of movies
Number of TV appearances
Years worked
Whether the role played had a name or not

Sounds like an interesting project.  If the logic can be precisely defined, I'd probably be willing to build it.

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Imdb Images
« Reply #7 on: January 19, 2010, 09:14:08 am »
Quote
If the logic can be precisely defined, I'd probably be willing to build it.

Add it to your list! ;)

I can imagine a filmography-based analysis producing a meaningful rating. One way would be some sort of scoring system. For example (note I'm assuming relational data, like a movie rating, can be accessed):

Unnamed role in movie: 1 point
Named role in movie: 1 x Rating of movie
Named role in movie in database: 3 x Rating
Series: 1 x # of episodes
Series in database: 3 x # of episodes
Years worked: # years

Then rating = total points/100

But it would be more fun and useful if the weight assigned to each such item could be specified by the user. Then we could experiment to get the most meaningful results. Other than being somewhat amusing, hopefully the rating would be very useful in identifying people we want to spend time hunting for photos or other data for.

One question I suppose we should ask... Is the rating field meant for any particular purpose? Is there a site out there that somehow rates the popularity of actors? Even if there is, I think this would provide a more personally meaningful result. There are many "popular" actors I can't stand. :)

mgpw4me@yahoo.com

  • Guest
Re: Imdb Images
« Reply #8 on: January 19, 2010, 10:44:20 am »
This is part of the work I want to do in order to be able to eliminate people from being searched on sites.  If I have a rating system, I can exit the script before any significant access to the site.  For example, shareapic.com (currently down) has a couple of hundred 'popular' actresses...5 to 60 galleries, each with 5 to 150 images...many hi-res.  There's no point in looking for b-movie people or men there.

One of the things that would be good with such a system, if it works, is that I could pull the rating from the database without any other processing, in order to determine if the script should access a 'popular celeb', 'b-movie' or other specialty site when searching for images.  People that don't do ratings will just have a much slower image search.  Works for me.

The ability to change parameters is actually, required for me as well since I'll have to 'tune' the routine to be reasonably effective at it's work.  I imagine that popularity would also be affected by the timeframe during which a person worked...seen a good Fay Wray movie lately?  Possibly some kind of state-dating based on years from current...maybe you lose .01 points for each year from current for each movie / show...with a maximum loss of 50% (another number to play with !!).

Personally, I think I'd rate movies higher than TV...except for current series.  The older the series is, the more it stale-dates.  I still watch many of the movies from my youth (esp. hammer productions....Christopher Lee, Vincent Price), but I really don't watch the Rifleman, Ed Sullivan, Gunsmoke, Bonanza, etc.  Chuck Connors may have been well known in his time, but that time isn't now.

Genre could also be useful.  Adult / reality-tv / gameshows (except maybe Vanna) and similar wouldn't rate as well.  It could be another sliding parameter in the 'fun with the numbers' part of the equation.

If I build the equation with floating point math, we'll be able to give partial points.

I just did a sort on rating on my database and things changed around, so I'm guessing it's being used somehow.  NO PROBLEM.  I can read the comments field from the database, add stats to the comments and save it all back again if I need to.

Last thought before I sign off for the night...if you've never been in a top-rated movie can you be a top-rated actor?  I think not.  If you been in many, you should get bonus points.  For example, did you know Edwige Fenech has been in more movies than Robert Deniro?

buah

  • Guest
Re: Imdb Images
« Reply #9 on: January 19, 2010, 01:28:07 pm »

I can imagine a filmography-based analysis producing a meaningful rating. One way would be some sort of scoring system. For example (note I'm assuming relational data, like a movie rating, can be accessed):

Unnamed role in movie: 1 point
Named role in movie: 1 x Rating of movie
Named role in movie in database: 3 x Rating
Series: 1 x # of episodes
Series in database: 3 x # of episodes
Years worked: # years

Then rating = total points/100


Awards and Nominations? For me, the most. And/or combined with Awarded and Nominated movies and series they starred in?

Excuse me for interfering , but i don't want to start a new topic, and I just had to ask a question to mgp. Is it possible to change IMPAwards script (if it's already not) so in advance to define whether you want to download normal or xlg images. For xlgs should be set "If 'xlg'=FALSE than 'normal" logic, and for both "If 'xlg'=FALSE AND 'normal'=False than skip if Mode='Silent'".

Cheers and keep up good work.
« Last Edit: January 19, 2010, 01:50:50 pm by buah »

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Imdb Images
« Reply #10 on: January 19, 2010, 02:14:38 pm »
Quote
if you've never been in a top-rated movie can you be a top-rated actor?  I think not.

It might be possible to over-think this. ;)

A rating can mean different things. How good or successful or talented an actor is. How popular they are. How much I like them. But what I'm thinking about is some measure of how important information about them is—in the context of my movie collection. There are a number of different ways and reasons a person may be "important." There's no question Brad Pitt and Angelina Jolie are important—regardless of whether I like their work. But I already know more about them than I will ever need or care to know. On the other hand, there are character actors who have had 50-year careers and appear in 20 movies in my collection. And I know the name, but can't match it to their face. So in the context of my need for information, such a person is even more important. And their photo is critically important because it's what causes me to think, "Oh yeah, that guy." It's what gets me interested in the other information information, as in, "Where have I seen him before?"

I believe a rating that's based on an analysis of my collection might be very effective in helping focus on the hundreds of people I will find of interest—for a variety of reasons—while paying less attention to the thousands who are of little interest.

The only thing that concerns me is hot young actresses don't have the career record to warrant a high score. Maybe your script could give them bonus rating point for being on a "hot list." ;)

Quote
Awards and Nominations? For me, the most.

Yes, I suppose a script could count the number of entries with "won" and "nominated." Separately—a win is worth at least 10 times a nomination. Putting too much weight on this may unduly disadvantage those working in countries where there are fewer awards or for which award results are not posted. A Hollywood actor who does not have at least 100 nominations should probably be deleted from the database. :D

Quote
Is it possible to change IMPAwards script...

It's a plugin, so nostra would have to revise it to make this configurable. It would be nice if it were. I always choose the large poster if one is available.

buah

  • Guest
Re: Imdb Images
« Reply #11 on: January 19, 2010, 04:27:24 pm »
... so nostra would have to revise it to make this configurable. It would be nice if it were. I always choose the large poster if one is available.

What is seen it cannot be unseen. Will it be seen? ;)

Offline deazo

  • Older Power User
  • *****
  • Posts: 283
    • View Profile
Re: Imdb Images
« Reply #12 on: January 19, 2010, 06:31:09 pm »

 Hi Buah, thanks for your effort in this.
 FYI, I tried your tool, and I get to the step of choosing the image, but once I click OK (the step when it should download and incorporate the image in the people info page), nothinf happens.
 Have u seen that before?


mgpw4me@yahoo.com

  • Guest
Re: Imdb Images
« Reply #13 on: January 19, 2010, 06:56:23 pm »
Awards would be a good rating scale, but I have reservations.  Example, 1 academy award = how many golden globes or teen choices ?  What if the award was for an album instead of a movie?  Eccchh, way too much work.  Even getting a list of the different awards would be ugly, let alone rating them.

There's also an issue with movie ratings...it's not reasonable to get at them. 
- Imdb access for every movie in a filmography (in my case 3,000 X 54,000 = too big a number)
- There are no shared fields between movies and people, so script access would involve violating the scripting environment design.  If it's even possible, Nostra would almost certainly plug the hole.
- dll is out.  It's too much effort for me to install another compiler at this time, and it's unmaintainable if I'm not around.
- stand-alone app is too cumbersome.
- Imdb http://www.imdb.com/chart/ has some interesting stats that might be usable in place of movie rankings.  54,000 X 4 or 5 would be marginally OK.
- allmovie also has similar things for genre http://allmovie.com/explore/genre/horror-654

Anyway, it needs more thought.

mgpw4me@yahoo.com

  • Guest
Re: Imdb Images
« Reply #14 on: January 19, 2010, 07:04:36 pm »

 Hi Buah, thanks for your effort in this.
 FYI, I tried your tool, and I get to the step of choosing the image, but once I click OK (the step when it should download and incorporate the image in the people info page), nothinf happens.
 Have u seen that before?


Go to the TOOLS->PREFERENCES menu option.  Select PLUGINS from the left-side column.  On the right-side a list of available plug-ins will be displayed.  Select ImdbImage.  Under the list, a series of checkboxes will appear with the options for ImdbImage.  Make sure PHOTO has a checkmark, and that SILENT MODE does not.

[attachment deleted by admin]
« Last Edit: January 19, 2010, 07:08:59 pm by mgpw4me@yahoo.com »

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Imdb Images Version 1.01 January 19
« Reply #15 on: January 19, 2010, 10:48:44 pm »
Quote
Version 1.01 fixes a bug in the people url, and allows the script to run in silent mode by updating the silent mode setting.

What does this mean? It still doesn't download anything in silent mode. Does that only work if there is only one image available?

mgpw4me@yahoo.com

  • Guest
Re: Imdb Images Version 1.01 January 19
« Reply #16 on: January 19, 2010, 10:55:10 pm »
The silent mode built into user mode only allows one result to be returned from a script.  The fix I made was to add a variable in the script.  If you edit the script so SILENT_MODE = True, then enter SILENT MODE to run the script, it will work correctly...adding a single image...the first one found.

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Imdb Images Version 1.01 January 19
« Reply #17 on: January 20, 2010, 12:47:31 am »
Quote
Awards would be a good rating scale, but I have reservations.

This is why I suggested just counting the occurrences of "won" and "nominated" in the awards listing (if that's possible). It's not going to be a very "accurate" measure of anything anyway. A win is obviously more meaningful than a nomination.

Quote
There's also an issue with movie ratings...it's not reasonable to get at them.

This is disappointing. I realized weighting the movies by their rating would only be feasible if it could be accessed in the database. It would take far too long to retrieve them again from IMDb (which for some would not be original source anyway). But this is not a big deal since such weightings are going to average out unless applied in some non-linear fashion. Even then, this would just be a way of fine tuning the number of items in the filmography as a measure of importance. That is, being in a lot of bad movies should not make someone more important than another in a fewer number of better movies.

But what really concerns me is this implies it's also not possible for the script to distinguish the movies that are in the collection. This is the best measure of what is important. I doesn't matter if the movies are good or bad, if the person is showing up in a lot of them—in any capacity—I'm going to interested in them. And there's no online source that's going to replace this measure.

Quote
Anyway, it needs more thought.

It would seem so. If there really is no way to access movies in the database, how about the option of looking up the movie in a user-supplied list of "movies of interest"? The list could even include weightings, which could be ratings—or anything else. While more cumbersome, this would allow another interesting element of control in how the people ratings are determined. The list could include all movies in the database, or any subset of it. If I don't care about dead actors I could exclude old movies. If I don't care about movies I don't own, I could exclude those. The list would be created, of course, simply by running an export template. I don't know how the script would work, but I guess it would somehow create a table from the list, and getting the information from it would be very fast.

Maybe I'm onto something here... How about another user supplied list of "people of interest"? This, too, could include weightings. This might be compiled (by the user) from other sources like lists of top actors, most beautiful women, etc. Including weightings would make it easier to combine various lists (e.g., beauty is obviously more important than talent). The existence of a person on the list would then be used as another factor (which could be assigned a weight) in the determination of their rating.

So the model becomes...

In people list: weight per list (0-10) x 50 points
Named role in movie: 1 point
Named role in movie in list: weight per list (0-10) x 1
Series: 1 x # of episodes
Series in list: 3 x # of episodes
Years worked: # years

Then rating = total points/100

Again, this is just an illustration. I think it would be much better if users had complete control over the weight assigned to each factor.

And a final thought—about keeping this whole idea in perspective. For me, the primary objective is to separate the relatively small number of people I'm "interested" in from those I'm not so interested in. In the end, I'm going to do something like select the 2,000 people who rated 8 and above and try to get good photos for them all. It really doesn't matter if they scored 8 or 10. I'm just going to be happy I narrowed the scope from 25,000. And those that scored between 7 and 8 simply missed the cut—I may look at them later. And the more factors used in the scoring, the more difficult it will be to understand why a particular rating ends up being what it is.

Offline deazo

  • Older Power User
  • *****
  • Posts: 283
    • View Profile
Re: Imdb Images Version 1.01 January 19
« Reply #18 on: January 20, 2010, 12:54:29 am »

 FYI, checking the "photo" box did the trick. ;)

mgpw4me@yahoo.com

  • Guest
Re: Imdb Images Version 1.01 January 19
« Reply #19 on: January 20, 2010, 03:44:34 am »

 FYI, checking the "photo" box did the trick. ;)

Glad to hear it...I was out of ideas otherwise.