Author Topic: AllRovi movie script  (Read 51753 times)

0 Members and 3 Guests are viewing this topic.

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: AllRovi movie script
« Reply #40 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.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2709
    • View Profile
Re: AllRovi movie script
« Reply #41 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.

Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: AllRovi movie script
« Reply #42 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? ;)

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2709
    • View Profile
Re: AllRovi movie script
« Reply #43 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.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline RazorHall

  • User
  • ***
  • Posts: 67
    • View Profile
Re: AllRovi movie script
« Reply #44 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)

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2709
    • View Profile
Re: AllRovi movie script
« Reply #45 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
« Last Edit: December 28, 2012, 02:47:59 pm by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2709
    • View Profile
Re: AllRovi movie script
« Reply #46 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);
« Last Edit: December 13, 2012, 07:41:18 pm by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2709
    • View Profile
Re: AllRovi movie script
« Reply #47 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.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2709
    • View Profile
Re: AllRovi movie script
« Reply #48 on: January 07, 2014, 11:56:04 am »
Notice:

AllRovi script does not work anymore.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD