I don't think moving routines around is the solution. I'm still not sure my solution works in all situations, but it seems to me the problem occurs when 'curPos' gets past the point in the page where the data exists (in this case, Characteristics). This can happen when the order of the data elements on the page change. Generally, the order does not change, but it can when all the usual data elements do not exist. So my solution is simply to reset 'curPos' to 'topPos' (introduced in an earlier version to solve the same issue for Rating and Genre). It seems to work for all the "problem" titles mentioned lately, and I haven't seen it break anything else. But...
//Save start position for Movie data
topPos := PosFrom('<div class="page-heading">', HTML, curPos)
...may not hold for those rare cases where what's normally a child page/tab doubles as the main page. Maybe I already have, but I'll test that once I recall an example of where we found that issue before. [Edit:] It seems I've already tested this, using
Top Model and
The Dallas Connection—cases where 'Cast and Crew' serves as the main page. So I think the only concern would be variations on that theme we have not yet encountered.
Also, there are two issues involved with titles like
Lustful Addiction. First, the AllRovi search does not find the movie. The page can only be accessed by entering the URL. (See
Adult titles are there, but not discoverable?) If the PVD record has the correct URL, the script should work fine. That is, Characteristics should now be retrieved.
All this from one of my few remaining brain cells. Please torture-test the attached.
[attachment deleted by admin]