English > Scripts and Templates

Adult.DVDEmpire.com (movies)

<< < (2/4) > >>

AimHere:
Another update:

I noticed that the existing script did not import anything into a movie's "Category" field, despite AdultDVDEmpire providing "Category" information for each movie title. So, I went ahead and added that functionality to it. I basically found the subroutine that imports the "Genre" field and copied it, substituting "Category" for "Genre":

--- Code: --- //Category
 curPos := PosFrom('<div class="Item_BrowseSectionTitle">Category:&nbsp;&nbsp;</div>', HTML, curPos);
 if curPos > 0 then begin
  curPos := curPos + Length('<div class="Item_BrowseSectionTitle">Category:&nbsp;&nbsp;</div>');
  EndPos := PosFrom('</div>', HTML, curPos);
  Tmp := Trim(RemoveTags(Copy(HTML, curPos, EndPos - curPos), False));
 
  AddFieldValue(mfCategory, Tmp);
 end;
 

--- End code ---

Note that this part should be inserted right before the "//Genre" section.

Following the advice of previous posts, I also updated the "//Script Data" section and bumped up the version number:

--- Code: --- //Script data
 //Fixed: "Production Year" changed to "Year" - AimHere 01/15/2009
 //Added: movie Category field - AimHere 01/25/2009
 SCRIPT_VERSION = '0.1.0.2';

--- End code ---

I've tested this against my own database and it works as intended. Note that with AdultDVDEmpire, it is possible for a title to belong to more than one category.

I'm attaching the complete script to this post.

Enjoy!

[attachment deleted by admin]

AimHere:
Hi again,

While importing some movie info, I happened to discover a bug with the plugin. If there is no single exact match for a movie on ADE (e.g. multiple matches, or no exact match at all), the plugin pops up a dialog listing possible matches for the user to choose from. But sometimes, that list will be missing some titles, and some of the ones that are shown will have the wrong year displayed alongside them. This can be verified by opening a web browser, going to the ADE site, and plugging the title of the movie (as you entered it in PVD) into the search form.

It appears the problem is that the ADE search results don't always give a "Production Year" for every movie on the list; sometimes, there is only a release date. But the plugin depends on the Production Year when generating the list for the dialog, and if it is missing, the plugin takes the year from the next entry that does have a "Production Year" tag. And in the process, skips over everything in-between!

For example, suppose a search  would turn up the following results if done manually:


* Movie A,  Release Date 1/1/2002 ~ Production Year 2001
* Movie B   Release Date 9/9/2007    (missing Production Year)
* Movie C,  Release Date 10/10/2000 ~ Production Year 1999
* Movie D,  Release Date 12/25/1986 ~ Production Year 1985
The plugin would pop up a dialog containing this, instead:


* Movie A (2001)
* Movie B (1999)
* Movie D (1985)
Note that Movie B has picked up the "Year" from Movie C, and Movie C itself is skipped entirely.  If there happen to be several entries between the one that is missing the "Production Year" and the next one that isn't, ALL the ones in-between will be skipped. I've seen search results that might contain a dozen entries, yet the ADE plugin only showed three! :(

Perhaps it would be better to extract the "Release Date" information from the search results, and use that to populate the list in the dialog?  Every entry in the search results does have a "Release Date" given, unlike the "Production Year", so no special programming tricks would be needed to avoid skipping entries.

Better still, I think, would be to extract the name of the production studio from the search results, and display THAT in the dialog, instead of (or in addition to) the year of production or release. Personally, I think it would be easier to distinguish among similarly-titled movies based on the name of the studio, rather than the year, since there ARE sometimes several movies with the same title released in the same year by different studios. (I guess in the porn industry it's hard to be original, LOL!)

(Note that the problem only affects the generation of the list that's shown for the user to choose from. I believe that once the user picks an item from the list and clicks "OK", the script will properly extract the "Production Year" [if it exists] from the main webpage for the chosen movie, in a separate step. However, even this could stand to be improved, since if the "Production Year" is not given for a movie at all, the script currently fills the "Year" field in PVD with a value of 0 [zero]...)

I'll see if I can figure out a way to fix these problems. My previous modifications were pretty simple, and I'm not really familiar enough with the PVD scripting system to make bigger changes just yet, but I'll see what I can do.

Aimhere

AimHere:
Adult.DVDEmpire.com script version 0.1.0.3

Hi again,

Okay, I made a few more changes. First, per my previous post, the search results parsing was modified to include the Studio name in the results, and to do a sanity check on the presence of the production year. Search results are now presented in either of the following forms:


--- Quote ---Title / Studio (Year)
OR
Title / Studio
--- End quote ---

Note that the production Year is only included if the Adult DVD Empire search results page includes it for that item. The script no longer "skips over" items in the search results if the Production Year is missing. This should avoid a lot of confusion.

Unfortunately, I also discovered that Adult DVD Empire recently changed the formatting of the URLs in search results, which completely broke the PVD script! That is, attempting to import movie information with the AdultDVDEmpire script did NOTHING. The script couldn't locate the keywords it was expecting to see in the HTML, and so couldn't extract ANY information from the webpages.

So I scrutinized the HTML generated by the Adult DVD Empire search engine, and made some adjustments. The script will once again properly import the original title, year, genres, categories, studio, URL, description, and features.

However, the script might not properly import people names (actors, director, etc.).  The HTML around the Cast list has changed (especially URLs). I wrangled with the script enough for it to extract at least some of the people names and associated URLs, but some things still aren't working right. On several tests I ran, the modified script imported all people properly; on others, it only grabbed a few, and/or missed their URLs.  It's not perfect, but right now I'm tired of beating my head against this particular wall. I think it's going to take someone with greater programming skill than I to fully correct the page parsing.  (Nostra, are you listening???)

Aimhere

[attachment deleted by admin]

AimHere:
Okay, another minor update of the script...

Seems Adult DVD Empire changed some of their HTML (again) and the script wasn't importing the studio name at all. Fixed.

AimHere

[attachment deleted by admin]

rick.ca:
A revised script for versions 0.9.9.5+ only has been posted here.

Hopefully, Aimhere will be willing to maintain both versions of the script. :-\

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version