English > Scripts and Templates

Silent Mode

(1/3) > >>

mgpw4me@yahoo.com:
I've been playing with the scripting language.  Overall, it's an excellent development environment, but I think I'm wearing a hole in the 'recompile' button from all the use it's getting.  := is a killer for a 'c' guy.

Anyway, I have a number of sites that have celebrity images, but no bio or other info.  This makes it difficult to determine, except manually, that you have the correct person.  In fact, some sites do a relevance search and pull up the wrong person name entirely.  I can do a 'sanity check' (by name) for this, but ultimately, if there's two people with the same name it won't help.

I'd like to ensure that people don't run a number of the scripts I'll be posting, in silent mode.  I can post warnings / disclaimers all I want, but somebody will still do this.  Of course, you and Rick are bigger targets, so you'll end up fronting the abuse.

Is there a way to disable or query for, silent mode in a script?

When sites do have biographical information, it would be nice if the PVD birthplace, birthday, AKAs and filmography of the person were available for sanity checking.  I could query IMDB for this, I guess, but there's still the issue for people with the same name on that site....let alone the maintenance issues when IMDB changes their site format.

If / when such things are available, I'll deal with it then.

The first batch of scripts will be posted soon.  You may want to start considering how to deal with a large "import from" menu.  At the moment, I have plans for over 50 scripts.

rick.ca:

--- Quote ---You may want to start considering how to deal with a large "import from" menu.  At the moment, I have plans for over 50 scripts.
--- End quote ---

If all or most of these are for getting photos, would it not be better to combine them into one script that can be configured as to which sites are used? I don't know if an interactive configuration is possible. But even if it could only be done by editing parameters in the script itself, it would be better than having 50 separate scripts to choose from. Users could still have as many configurations as they want—by making copies of the script configured in different ways.

A combined script could also offer a more automated way to look for photos from a variety of sites. For example, get images only within a specified range of resolution, stop after X such images obtained, etc. The could be used to get a limited number of "good" photos, with the hope that at least one would be the correct person and otherwise acceptable.

mgpw4me@yahoo.com:
Yup, you're right.

<brainfart value='begin'>

I have thought of this, but haven't quite figured out the logic.  Maybe writing this will clear my head.

All the sites have been categorized by sex (m/f), rating (g/pg/r), size of images, number of images, niche (vintage, region...asia / italy / etc, current celebs, genre, etc).

To really make the script work, I'd need to have preferences to reflect the interests of the person, as well as some information from other sources...ie from imdb (actor/actress) so I'd need access to the URL in the database via the script, and preferrably (don't want rewrite the 'get a person' code from the IMDB plugin) their place of birth and birthday.  I can then assign priorities to the various sites based on that information and search them in order.  There would have to be an override on this to reflect 'no nudity', min / max images sizes.

Personal preferences could indeed be hardcoded into the script.  For specific images of oriental or vintage film cast members, I'd still want to hit specific sites first, which would be a runtime setting.

Assuming that is resolved, or just ignored, I start processing. 

I go to a site and find some images.  The site has several pages of images, so iterate through pages, adding hits to the list of links that need to be followed.  If I 'early out' the routine, any site that has images later in the list won't ever be processed.  If I don't, I have to iterate through every site using bandwidth / time.

So I assume, let's go through them all and sort it out later.

If I only have one link, and it's from a site that needs to be validated manually, I can't reasonably allow an update without manual intervention. 

So that site can't be included in the script.

I now have a list of 20 links that lead to image pages.  If I use the first link as default, I should have done an 'early out'.  If I don't I have to assume the person is sitting there making the selection.

I assume the person is not there. 

Do I choose a link by the number of images on the page, or do I have the order set such that the most reliable site comes first?

I assume reliability, so after a hit on a reliable site, I can 'early out'...none of the others would be selected anyway.

This all sounds doable, and would suit my uses perfectly.  For everyone else, there's a lot of guesswork involved which makes the whole thing inefficient.  If I brute-force it, the result could be brutal...hit 50+ sites and find nothing.

Re-reading your post, it occurs to me that I could list one image from each site (or a text link if not available on the listing page), with a link to the image page(s).  Click on the image, get a list of images from that site.  I'm not sure how easy it will be to select the routine that selects what parsing procedure to call for each link.  I suppose I could put a tag in the listing title.

Now it's starting to make better sense to me.

I have one script done, minus sanity checks so I'll use that as a base and see what problems come up.

</brainfart>

rick.ca:
It's a difficult thing to balance. Some users will expect such a script to help them in their quest for the perfect photo for their favourite people. Accordingly, they will want a lot of options, and expect it to be interactive. Others will expect it to be fully automatic, and be able to get reasonable photos for any/all persons selected. Considering the numbers involved, I would lean towards the latter. There's 25,000 people in my database, and there's no easy way for me to identify the 10-20% I really want photos for. So I'm probably going to need to do a mass update.

The ideal solution would be something that can be configured both ways. I can see myself configuring such a script in three different versions. One for a mass update to get one photo as quickly as possible. Another to get 3 - 6 photos of good quality from a variety of sites. I would then review the results and select one to display (or delete all but one). Finally, I would have one configured to get a large selection from a large number of sites. This would be for "difficult cases" and would be run only on one or a few people at a time.

I think the biggest problem you have is finding a way to ensure the person is correctly identified. IMDb photos may be crap, but at least they're of the right person (I'm sure there are errors, but I've never detected one). Nothing could be more disastrous than letting such a script run in silent mode if it were adding photos when not 99.9% sure the person is the same. At the same time, not allowing it to run in silent mode renders it useless for mass updates. That may have to be so, but then manual intervention may not help either. In most cases, I want the photo to help me identify the person—I'm not the one to ask whether a photo is correct or not.

Hmmm. So unless you can incorporate some face-recognition technology, I suppose it has to be interactive. But this raises another question... nostra suggested using another plugin or script to get photos where IMDb has none. I wonder how his code looks up an existing people in different databases. Maybe it doesn't, and that why I had this problem getting the Kinopoisk script to download a photo. :-\

mgpw4me@yahoo.com:
I can certainly add a 'be safe be sure' or 'I'll monitor it' option to the script.  If I could look at the program stack to determine how many iterations of the scripts were set to run, that wouldn't be necessary.  Of course stack access would be a major programming blooper if it were implemented.  Silent mode is the one thing that prevents full automation.  There's no reason there couldn't be a script for each.  It would be better to be allowed to include one script within another, so the parsing code could remain unchanged, and just the control structures would be different.  Maintenance would only have to be applied in one place when site changes occurred.

The problem more than anything is the limited information about the person available to the script.  I can pass the name to the url, and parse that, so at least I know who I'm looking for, but without an imdb url to parse or birth info, or filmography, it's difficult to determine who is who.  Most sites give a clue about the person (AKAs, idbm url, date of birth) that I could check against, if it was available.  To some extent, it's reasonable to say that a search on IMDB that provides only a single 100% result would be enough to ensure the right person was selected...assuming imdb was alway 100% correct and inclusive (not!!!).  I still prefer filmography as that is more commonly available.  Just knowing that a person was primarily involved in TV narrows the list of sites from 54 to about 3 (with sanity checking).

To some extent, it comes down to knowing who you are downloading at any one time, and knowing what extra info might be on the page to help you determine what is up.  Since the script runs system modal, there's no way to look at the info in PVD unless you move the window, and happen to have the right page open.  I've often been able to look at multiple images and determine from the age of the image what person I was looking for.

Did you know that facial recognition only requires 80 data points, and that current technology only requires 40 for a positive match?  Now if only I had access to the bitmap <grin>.

If I had access to the url via script, I'd actually write a script to pull all the images from IMDB and put up a list to select from.  I'd write a dll and just deal with the whole thing, but I'm using the free c++ builder and it doesn't support adding components.  My old c++ builder supports components, but it's version 1.0 so current component structures aren't supported (ie. can't be added).

It sucks to get old (software).

Navigation

[0] Message Index

[#] Next page

Go to full version