Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.

Name:
Email:
Subject:
Message icon:

Attach:
(Clear Attachment)
(more attachments)
Allowed file types: gif, jpg, png, txt, tpl, lng, ini, pvd, psf, ini, cfg, csv, zip, xml, pas, 7z
Restrictions: 4 per post, maximum total size 1024KB, maximum individual size 1024KB
Note that any files attached will not be displayed until approved by a moderator.
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What is the best video database software?:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: Ivek23
« on: January 07, 2014, 11:56:04 am »

Notice:

AllRovi script does not work anymore.
Posted by: Ivek23
« on: December 28, 2012, 09:28:22 am »

Correction relates to this post:
http://www.videodb.info/forum_en/index.php/topic,2496.msg16185.html#msg16185


I made a slight adjustment in ParsePage function (ParseSearchResults section).

I have this piece of code:
Code: [Select]
if Pos('Search Results for', HTML) > 0 then begin
ParseSearchResults(HTML);
Result := prList;
Exit;
end else

if (Mode = 0) AND (Pos('<h2>cast</h2>', HTML) > 0) then begin
ParseMovie(URL, HTML);
LogMessage('Getting main details from Cast & Crew page...');
end else
if (Mode = 0) AND (Pos('<strong>review</strong>', HTML) > 0) then begin
ParseMovie(URL, HTML);
LogMessage('Getting main details from Review page...');
end else
if (Mode = 0) AND (Pos('<h2>releases</h2>', HTML) > 0) then
ParseMovie(URL, HTML)
else
if Pos('- Cast, Reviews, Summary, and Awards - AllRovi</title>', HTML) > 0 then
ParseMovie(URL, HTML)
else
if Pos('- Review - AllRovi</title>', HTML) > 0 then
ParseReview(HTML)
else
if Pos('- Cast and Crew - AllRovi</title>', HTML) > 0 then
ParseCast(HTML)
else
if Pos('- Releases - AllRovi</title>', HTML) > 0 then
ParseDVDReleases(HTML);

Mode := NextMode(Mode);

No, not with this part of code:
replace this part of code:
Code: [Select]
if Pos('Search Results for', HTML) > 0 then begin
ParseSearchResults(HTML);
Result := prList;
Exit;
end else

if (Mode = 0) AND (Pos('<span>cast & crew</span></a>', HTML) > 0) then begin
ParseMovie(URL, HTML);
LogMessage('Getting main details from Cast & Crew page...');
end else
if (Mode = 0) AND (Pos('<span>review</span></a>', HTML) > 0) then begin
ParseMovie(URL, HTML);
LogMessage('Getting main details from Review page...');
end else
if (Mode = 0) AND (Pos('<span>releases</span></a>', HTML) > 0) then begin
ParseMovie(URL, HTML);
LogMessage('Getting main details from Releases page...');
end else
if (Mode = 0) AND (Pos('<h2>cast</h2>', HTML) > 0) then begin
ParseMovie(URL, HTML);
LogMessage('Getting main details from Cast & Crew page...');
end else
if (Mode = 0) AND (Pos('<strong>review</strong>', HTML) > 0) then begin
ParseMovie(URL, HTML);
LogMessage('Getting main details from Review page...');
end else
if (Mode = 0) AND (Pos('<h2>releases</h2>', HTML) > 0) then
ParseMovie(URL, HTML)
else
if Pos('- Cast, Reviews, Summary, and Awards - AllRovi</title>', HTML) > 0 then
ParseMovie(URL, HTML)
else
if Pos('- Review - AllRovi</title>', HTML) > 0 then
ParseReview(HTML)
else
if Pos('- Cast and Crew - AllRovi</title>', HTML) > 0 then
ParseCast(HTML)
else
if Pos('- Releases - AllRovi</title>', HTML) > 0 then
ParseDVDReleases(HTML);

Mode := NextMode(Mode);
but

replace this part of code:

Code: [Select]
if Pos('Search Results for', HTML) > 0 then begin
ParseSearchResults(HTML);
Result := prList;
Exit;
end else

if (Mode = 0) AND (Pos('<h2>cast</h2>', HTML) > 0) then begin
ParseMovie(URL, HTML);
LogMessage('Getting main details from Cast & Crew page...');
end else
if (Mode = 0) AND (Pos('<h2>crew</h2>', HTML) > 0) then begin
ParseMovie(URL, HTML);
LogMessage('Getting main details from Cast & Crew page...');
end else
if (Mode = 0) AND (Pos('<strong>review</strong>', HTML) > 0) then begin
ParseMovie(URL, HTML);
LogMessage('Getting main details from Review page...');
end else
if (Mode = 0) AND (Pos('<h2>releases</h2>', HTML) > 0) then
ParseMovie(URL, HTML)
else
if Pos('- Cast, Reviews, Summary, and Awards - AllRovi</title>', HTML) > 0 then
ParseMovie(URL, HTML)
else
if Pos('- Review - AllRovi</title>', HTML) > 0 then
ParseReview(HTML)
else
if Pos('- Cast and Crew - AllRovi</title>', HTML) > 0 then
ParseCast(HTML)
else
if Pos('- Releases - AllRovi</title>', HTML) > 0 then
ParseDVDReleases(HTML);

Mode := NextMode(Mode);

Now in the movie, with only definite information is now enabled data transfer. Previous version of the script, these data did not downloaded.
Posted by: Ivek23
« on: December 13, 2012, 07:27:26 pm »

~Moods~ from 'Characteristics' and save ~Mood links~ if available

I added some url links (below is the new list of url links) to AllMovie mood pages.

Code: [Select]
//Pull ~Moods~ from 'Characteristics' and save ~Mood links~ if available
TmpStr2 := '';
TmpStr3 := '';
if Pos('A Good Cry', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'A Good Cry';
if Pos('A Good Cry', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://allmovie.com/explore/mood/a-good-cry-2028">A Good Cry</link>';
TmpStr := StringReplace(TmpStr, 'A Good Cry', '', true, true, true);
if Pos('A World of Its Own', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'A World of Its Own';
if Pos('A World of Its Own', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + 'A World of Its Own';
TmpStr := StringReplace(TmpStr, 'A World of Its Own', '', true, true, true);
if Pos('Abandon All Hope', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Abandon All Hope';
if Pos('Abandon All Hope', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/abandon-all-hope-2066">Abandon All Hope</link>';
TmpStr := StringReplace(TmpStr, 'Abandon All Hope', '', true, true, true);
if Pos('Adrenaline Rush', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Adrenaline Rush';
if Pos('Adrenaline Rush', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/adrenaline-rush-2026">Adrenaline Rush</link>';
TmpStr := StringReplace(TmpStr, 'Adrenaline Rush', '', true, true, true);
if Pos('Angsty', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Angsty';
if Pos('Angsty', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + 'Angsty';
TmpStr := StringReplace(TmpStr, 'Angsty', '', true, true, true);
if Pos('Bad Taste', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Bad Taste';
if Pos('Bad Taste', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/bad-taste-2031">Bad Taste</link>';
TmpStr := StringReplace(TmpStr, 'Bad Taste', '', true, true, true);
if Pos('Blood and Gore', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Blood and Gore';
if Pos('Blood and Gore', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/blood-and-gore-260">Blood and Gore</link>';
TmpStr := StringReplace(TmpStr, 'Blood and Gore', '', true, true, true);
if Pos('Button Pushers', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Button Pushers';
if Pos('Button Pushers', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + 'Button Pushers';
TmpStr := StringReplace(TmpStr, 'Button Pushers', '', true, true, true);
if Pos('Carnal Knowledge', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Carnal Knowledge';
if Pos('Carnal Knowledge', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/carnal-knowledge-262">Carnal Knowledge</link>';
TmpStr := StringReplace(TmpStr, 'Carnal Knowledge', '', true, true, true);
if Pos('Comedy on the Edge', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Comedy on the Edge';
if Pos('Comedy on the Edge', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/comedy-on-the-edge-2030">Comedy on the Edge</link>';
TmpStr := StringReplace(TmpStr, 'Comedy on the Edge', '', true, true, true);
if Pos('Estrogen Shot', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Estrogen Shot';
if Pos('Estrogen Shot', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + 'Estrogen Shot';
TmpStr := StringReplace(TmpStr, 'Estrogen Shot', '', true, true, true);
if Pos('Eyepoppers', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Eyepoppers';
if Pos('Eyepoppers', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + 'Eyepoppers';
TmpStr := StringReplace(TmpStr, 'Eyepoppers', '', true, true, true);
if Pos('Fantastic Reality', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Fantastic Reality';
if Pos('Fantastic Reality', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/fantastic-reality-2024">Fantastic Reality</link>';
TmpStr := StringReplace(TmpStr, 'Fantastic Reality', '', true, true, true);
if Pos('Flames of Passion', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Flames of Passion';
if Pos('Flames of Passion', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/flames-of-passion-262">Flames of Passion</link>';
TmpStr := StringReplace(TmpStr, 'Flames of Passion', '', true, true, true);
if Pos('Food for Thought', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Food for Thought';
if Pos('Food for Thought', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/food-for-thought-2032">Food for Thought</link>';
TmpStr := StringReplace(TmpStr, 'Food for Thought', '', true, true, true);
if Pos('For Love and Country', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'For Love of Country';
if Pos('For Love and Country', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/god-and-country-257">For Love and Country</link>';
TmpStr := StringReplace(TmpStr, 'For Love and Country', '', true, true, true);
if Pos('God and Country', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'God and Country';
if Pos('God and Country', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/god-and-country-257">God and Country</link>';
TmpStr := StringReplace(TmpStr, 'God and Country', '', true, true, true);
if Pos('Gutbusters', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Gutbusters';
if Pos('Gutbusters', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + 'Gutbusters';
TmpStr := StringReplace(TmpStr, 'Gutbusters', '', true, true, true);
if Pos('Head Trips', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Head Trips';
if Pos('Head Trips', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://allmovie.com/explore/mood/head-trips-2035">Head Trips</link>';
TmpStr := StringReplace(TmpStr, 'Head Trips', '', true, true, true);
if Pos('High on Emotion', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'High on Emotion';
if Pos('High on Emotion', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/high-on-emotion-2028">High on Emotion</link>';
TmpStr := StringReplace(TmpStr, 'High on Emotion', '', true, true, true);
if Pos('In a Minor Key', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'In a Minor Key';
if Pos('In a Minor Key', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/in-a-minor-key-269">In a Minor Key</link>';
TmpStr := StringReplace(TmpStr, 'In a Minor Key', '', true, true, true);
if Pos('In the Mood for Love', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'In the Mood for Love';
if Pos('In the Mood for Love', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/in-the-mood-for-love-2027">In the Mood for Love</link>';
TmpStr := StringReplace(TmpStr, 'In the Mood for Love', '', true, true, true);
if Pos('Just for Fun', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Just for Fun';
if Pos('Just for Fun', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/just-for-fun-2029">Just for Fun</link>';
TmpStr := StringReplace(TmpStr, 'Just for Fun', '', true, true, true);
if Pos('Just for Laughs', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Just for Laughs';
if Pos('Just for Laughs', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/just-for-laughs-2029">Just for Laughs</link>';
TmpStr := StringReplace(TmpStr, 'Just for Laughs', '', true, true, true);
if Pos('Memory Lane', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Memory Lane';
if Pos('Memory Lane', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/memory-lane-2025">Memory Lane</link>';
TmpStr := StringReplace(TmpStr, 'Memory Lane', '', true, true, true);
if Pos('Mindbenders', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Mindbenders';
if Pos('Mindbenders', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/mindbenders-2035">Mindbenders</link>';
TmpStr := StringReplace(TmpStr, 'Mindbenders', '', true, true, true);
if Pos('Mood Enhancers', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Mood Enhancers';
if Pos('Mood Enhancers', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/mood-enhancers-2036">Mood Enhancers</link>';
TmpStr := StringReplace(TmpStr, 'Mood Enhancers', '', true, true, true);
if Pos('Nail-biters', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Nail-biters';
if Pos('Nail-biters', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/nail-biters-2037">'Nail-biters</link>';
TmpStr := StringReplace(TmpStr, 'Nail-biters', '', true, true, true);
if Pos('Off the Beaten Path', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Off the Beaten Path';
if Pos('Off the Beaten Path', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + 'Off the Beaten Path';
TmpStr := StringReplace(TmpStr, 'Off the Beaten Path', '', true, true, true);
if Pos('Only Human', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Only Human';
if Pos('Only Human', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/only-human-264">Only Human</link>';
TmpStr := StringReplace(TmpStr, 'Only Human', '', true, true, true);
if Pos('Other Dimensions', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Other Dimensions';
if Pos('Other Dimensions', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/other-dimensions-2038">Other Dimensions</link>';
TmpStr := StringReplace(TmpStr, 'Other Dimensions', '', true, true, true);
if Pos('Pick-Me-Ups', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Pick-Me-Ups';
if Pos('Pick-Me-Ups', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/pick-me-ups-2036">Pick-Me-Ups</link>';
TmpStr := StringReplace(TmpStr, 'Pick-Me-Ups', '', true, true, true);
if Pos('Slow Burn', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Slow Burn';
if Pos('Slow Burn', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + 'Slow Burn';
TmpStr := StringReplace(TmpStr, 'Slow Burn', '', true, true, true);
if Pos('Spellbinders', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Spellbinders';
if Pos('Spellbinders', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/spellbinders-265">Spellbinders</link>';
TmpStr := StringReplace(TmpStr, 'Spellbinders', '', true, true, true);
if Pos('Strictly Speaking', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Strictly Speaking';
if Pos('Strictly Speaking', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/strictly-speaking-2034">Strictly Speaking</link>';
TmpStr := StringReplace(TmpStr, 'Strictly Speaking', '', true, true, true);
if Pos('Thrill Rides', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Thrill Rides';
if Pos('Thrill Rides', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/thrill-rides-2026">Thrill Rides</link>';
TmpStr := StringReplace(TmpStr, 'Thrill Rides', '', true, true, true);
if Pos('Tough Guys', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Tough Guys';
if Pos('Tough Guys', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/tough-guys-259">Tough Guys</link>';
TmpStr := StringReplace(TmpStr, 'Tough Guys', '', true, true, true);
if Pos('Trashy', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Trashy';
if Pos('Trashy', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/trashy-2031">Trashy</link>';
TmpStr := StringReplace(TmpStr, 'Trashy', '', true, true, true);
if Pos('Triumph of the Geeks', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Triumph of the Geeks';
if Pos('Triumph of the Geeks', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + 'Triumph of the Geeks';
TmpStr := StringReplace(TmpStr, 'Triumph of the Geeks', '', true, true, true);
if Pos('Triumph of the Spirit', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Triumph of the Spirit';
if Pos('Triumph of the Spirit', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + '<link url="http://web.archive.org/web/http://www.allmovie.com/explore/mood/triumph-of-the-spirit-2033">Triumph of the Spirit</link>';
TmpStr := StringReplace(TmpStr, 'Triumph of the Spirit', '', true, true, true);
if Pos('Uncomfortable Viewing', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Uncomfortable Viewing';
if Pos('Uncomfortable Viewing', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + 'Uncomfortable Viewing';
TmpStr := StringReplace(TmpStr, 'Uncomfortable Viewing', '', true, true, true);
if Pos('Unloveables', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Unloveables';
if Pos('Unloveables', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + 'Unloveables';
TmpStr := StringReplace(TmpStr, 'Unloveables', '', true, true, true);
if Pos('Young and Old Alike', TmpStr) > 0 then TmpStr2 := TmpStr2 + ', ' + 'Young and Old Alike';
if Pos('Young and Old Alike', TmpStr) > 0 then TmpStr3 := TmpStr3 + ', ' + 'Young and Old Alike';
TmpStr := StringReplace(TmpStr, 'Young and Old Alike', '', true, true, true);

TmpStr := StringReplace(TmpStr, ' A ', ' a ', true, false, true);
TmpStr := StringReplace(TmpStr, ' An ', ' an ', true, false, true);
TmpStr := StringReplace(TmpStr, ' And ', ' and ', true, false, true);
TmpStr := StringReplace(TmpStr, ' & ', ' and ', true, false, true);
TmpStr := StringReplace(TmpStr, ' By ', ' by ', true, false, true);
TmpStr := StringReplace(TmpStr, ' For ', ' for ', true, false, true);
TmpStr := StringReplace(TmpStr, ' From ', ' from ', true, false, true);
TmpStr := StringReplace(TmpStr, ' In ', ' in ', true, false, true);
TmpStr := StringReplace(TmpStr, ' Into ', ' into ', true, false, true);
TmpStr := StringReplace(TmpStr, ' Of ', ' of ', true, false, true);
TmpStr := StringReplace(TmpStr, ' On ', ' on ', true, false, true);
TmpStr := StringReplace(TmpStr, ' Or ', ' or ', true, false, true);
TmpStr := StringReplace(TmpStr, ' The ', ' the ', true, false, true);
TmpStr := StringReplace(TmpStr, ' To ', ' to ', true, false, true);
TmpStr := StringReplace(TmpStr, ' With ', ' with ', true, false, true);
TmpStr := StringReplace(TmpStr, ' ,', '', true, true, true);
if Pos(', ', TmpStr) = 1 then Delete(TmpStr, 1, 2);
AddCustomFieldValueByName('Characteristics', TmpStr);

AddCustomFieldValueByName('Attributes', TmpStr1);

AddCustomFieldValueByName('Moods', TmpStr2);

Delete(TmpStr3, 1, 2);
AddCustomFieldValueByName('Mood links', TmpStr3);
Posted by: Ivek23
« on: December 13, 2012, 10:42:46 am »

I made a slight adjustment in ParseSearchResults section.
I have this piece of code:
Code: [Select]
if Pos('Search Results for', HTML) > 0 then begin
ParseSearchResults(HTML);
Result := prList;
Exit;
end else

if (Mode = 0) AND (Pos('<h2>cast</h2>', HTML) > 0) then begin
ParseMovie(URL, HTML);
LogMessage('Getting main details from Cast & Crew page...');
end else
if (Mode = 0) AND (Pos('<strong>review</strong>', HTML) > 0) then begin
ParseMovie(URL, HTML);
LogMessage('Getting main details from Review page...');
end else
if (Mode = 0) AND (Pos('<h2>releases</h2>', HTML) > 0) then
ParseMovie(URL, HTML)
else
if Pos('- Cast, Reviews, Summary, and Awards - AllRovi</title>', HTML) > 0 then
ParseMovie(URL, HTML)
else
if Pos('- Review - AllRovi</title>', HTML) > 0 then
ParseReview(HTML)
else
if Pos('- Cast and Crew - AllRovi</title>', HTML) > 0 then
ParseCast(HTML)
else
if Pos('- Releases - AllRovi</title>', HTML) > 0 then
ParseDVDReleases(HTML);

Mode := NextMode(Mode);

replace this part of code:
Code: [Select]
if Pos('Search Results for', HTML) > 0 then begin
ParseSearchResults(HTML);
Result := prList;
Exit;
end else

if (Mode = 0) AND (Pos('<span>cast & crew</span></a>', HTML) > 0) then begin
ParseMovie(URL, HTML);
LogMessage('Getting main details from Cast & Crew page...');
end else
if (Mode = 0) AND (Pos('<span>review</span></a>', HTML) > 0) then begin
ParseMovie(URL, HTML);
LogMessage('Getting main details from Review page...');
end else
if (Mode = 0) AND (Pos('<span>releases</span></a>', HTML) > 0) then begin
ParseMovie(URL, HTML);
LogMessage('Getting main details from Releases page...');
end else
if (Mode = 0) AND (Pos('<h2>cast</h2>', HTML) > 0) then begin
ParseMovie(URL, HTML);
LogMessage('Getting main details from Cast & Crew page...');
end else
if (Mode = 0) AND (Pos('<strong>review</strong>', HTML) > 0) then begin
ParseMovie(URL, HTML);
LogMessage('Getting main details from Review page...');
end else
if (Mode = 0) AND (Pos('<h2>releases</h2>', HTML) > 0) then
ParseMovie(URL, HTML)
else
if Pos('- Cast, Reviews, Summary, and Awards - AllRovi</title>', HTML) > 0 then
ParseMovie(URL, HTML)
else
if Pos('- Review - AllRovi</title>', HTML) > 0 then
ParseReview(HTML)
else
if Pos('- Cast and Crew - AllRovi</title>', HTML) > 0 then
ParseCast(HTML)
else
if Pos('- Releases - AllRovi</title>', HTML) > 0 then
ParseDVDReleases(HTML);

Mode := NextMode(Mode);

Now in the movie, with only definite information is now enabled data transfer. Previous version of the script, these data did not downloaded.

Notice:

For once this correction is not valid, the correction followed later.
Remains the first method, because this correction in the script (if existing url addresses already stored in the database) , then script does
not correctly work.


Correction in this post:
http://www.videodb.info/forum_en/index.php/topic,2496.msg16250.html#msg16250
Posted by: RazorHall
« on: August 20, 2011, 04:35:51 pm »

Who knows what we'll hear from, say, the art film crowd... ;)

Oh, I like those too and have plenty of them in my collection.  Just haven't run into any problems with them yet.   8)
Posted by: Ivek23
« on: August 19, 2011, 08:23:20 pm »

Well, we're not programmers. If some things didn't work by accident, where would we be? ;)
I agree.
Posted by: rick.ca
« on: August 19, 2011, 10:26:30 am »

Well, we're not programmers. If some things didn't work by accident, where would we be? ;)
Posted by: Ivek23
« on: August 19, 2011, 06:05:57 am »

Code: [Select]
//~Crew~curPos := Pos('<div class="profession-box">', HTML);
if curPos < 1 then
Exit;
It was my mistake.

Code: [Select]
//~Crew~

curPos := Pos('<div class="profession-box">', HTML);
if curPos < 1 then
Exit;
Meant it was such a piece of code.

Code: [Select]
//~Crew~

if curPos < 1 then
Exit;
Even this piece of code works great, I have a feeling that the script works even better with this part of code than with the part above the proper codes meant, and it was quite right that it was this one piece of code
Code: [Select]
curPos := Pos('<div class="profession-box">', HTML);removed. I tested with this part of the code
Code: [Select]
//~Crew~

if curPos < 1 then
Exit;
test movies, series and documentaries, is really perfect works. so sorry if I just now spoke up and answered the question.

Posted by: rick.ca
« on: August 19, 2011, 01:04:06 am »

Quote
...have something in common in the Cast & Crew tab, there is only the Crew section, but is not there Cast section, so AllRovi script did not pass the info data with Section Crew.

Nice catch. This situation seems to be very common for TV Series. I hadn't noticed because I don't use AllRovi for Series. It's rare for movies, but not so uncommon for documentaries. The script seems to work for all of them.

And it works for all my test records, so this is it. I'm uploading version 1.3 now.
Posted by: rick.ca
« on: August 18, 2011, 11:25:27 pm »

Quote
AllRovi 1.3 candidate 1 attached.

I haven't tested it yet, but I'm curious about this...

Code: [Select]
//~Crew~curPos := Pos('<div class="profession-box">', HTML);
if curPos < 1 then
Exit;

Did you intend to disable the setting of curPos, or did you accidentally delete the line feed?

[Edit:] You must have—it doesn't work with this line active. I've removed it.
Posted by: Ivek23
« on: August 18, 2011, 02:58:41 pm »

This movies
Stargate Universe [TV Series] (2009)
Stargate Atlantis [TV Series] (2004)
Stargate Infinity [Animated TV Series] (2002)
have something in common in the Cast & Crew tab, there is only the Crew section, but is not there Cast section, so AllRovi script did not pass the info data with Section Crew.

So I ParseCast adding pieces of code
Code: [Select]
//~Cast~ or ~ctActors~
//save entire Cast tab to custom memo field, as well as individual actors.

procedure ParseCast(HTML : String);
var
curPos, endPos : Integer;
TmpStr : String;
Name, Role, URL : String;
begin
curPos := Pos('<div class="tabset-content main-tab-pane">', HTML);
if curPos < 1 then

curPos := Pos('<div class="description-box">', HTML);
if curPos < 1 then
Exit;
 
TmpStr := '';
 ...

 ...
AddCustomFieldValueByName('Cast', TmpStr);


//~Crew~
curPos := Pos('<div class="profession-box">', HTML);
if curPos < 1 then
Exit;

TmpStr := '';
 ...

 ...
end;

AddCustomFieldValueByName('Crew', TmpStr);

end;


//~Releases~


and now pass the info data with Section Crew,
(edit:) or if the Cast section and Crew section both there.

EDIT
AllRovi 1.3 candidate 1 attached.

[attachment deleted by admin]
Posted by: rick.ca
« on: August 18, 2011, 06:32:04 am »

Thanks. But let's not get too excited. Most of my test titles came from you. Who knows what we'll hear from, say, the art film crowd... ;)
Posted by: RazorHall
« on: August 18, 2011, 02:28:13 am »

AllRovi 1.3 Candidate works perfectly on every title I've tried so far.  I'll let you know if any other weird cases should appear.  And thanks!  You guys are doing a terrific job.   :D
Posted by: rick.ca
« on: August 17, 2011, 11:26:31 pm »

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...

Code: [Select]
//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]
Posted by: RazorHall
« on: August 17, 2011, 03:11:45 pm »

A little more progress there, but the Characteristics problem still shows up on a select few movies, such as Lustful Addiction.
Posted by: Ivek23
« on: August 17, 2011, 02:30:14 pm »

For many problems medicine is so, so it was also a problem with AllRovi script is also found medicine to solve problems.

So when I was looking for solutions and work tests for this one Edgar Allen Poe's Darkness movie, which has caused me many problems and I almost gave up on this , I came up thought, what if I try the current AllRovi script only copy ~Characteristics~ and added to the end ParseMovie.
I was first surprised that the script is working at all, even greater surprise was when I have the above-mentioned film, as well as Lost Lake movie transferred all info available data.
Tested about 30 movie and fine work.

See images.
AllRovi test2 script attached.

[attachment deleted by admin]
Posted by: Ivek23
« on: August 17, 2011, 08:00:17 am »

The test script fixed the problem for some movies, but not all.  Example: Edgar Allen Poe's Darkness.

How in this case the current version works.

Thanks. I think we need to figure out what's actually going wrong with the logic of the script before releasing further changes. I assume the current version (0.1.1.2) is no worse than the previous version or Ivek's test version—that it only fails for some movies for which AllRovi does not have complete information).

Will cost us a few brain cells to figure out what is actually wrong with the logic of the script.

BTW:
I suggest that until we find solutions to these problems, current version is used, if it does not transfer all info data which are available for a particular movie, then a test version.

I hope that this combination is currently a solution for the time being to problems.
Posted by: rick.ca
« on: August 17, 2011, 06:55:49 am »

Thanks. I think we need to figure out what's actually going wrong with the logic of the script before releasing further changes. I assume the current version (0.1.1.2) is no worse than the previous version or Ivek's test version—that it only fails for some movies for which AllRovi does not have complete information).
Posted by: RazorHall
« on: August 17, 2011, 05:54:31 am »

The test script fixed the problem for some movies, but not all.  Example: Edgar Allen Poe's Darkness.
Posted by: rick.ca
« on: August 16, 2011, 11:36:30 pm »

Still finding the occasional movie where Characteristics aren't being downloaded.  Lost Lake, for example.

If you don't mind, please test Ivek's modified script—for both the kind of movies you've had problems with (generally, ones for which AllRovi doesn't have complete information) and other more "normal" ones. I haven't got time to test, and want to be sure we're not breaking anything else with this. Thanks.