Page 1 of 1

Three Lines Update

Posted: 2007-08-28 06:19:48
by DarKHawK
Hello,

Lacc made a modification for the old IMDB script for me a while ago.

I need someone please to update these 3 lines for me for the new script

Those where the lines to get the number of votes, and if the movie was in the top 250.
I tried to update them, but it was like a blind man trying to play darts :).

Code: Select all

//
    Value2 := TextBetween(PageText, '/rating-stars/', '/rating-vote/');
    Value2 := TextBetween(Value2, '</b> (', ')');
    Value3 := TextBetween(PageText, '/rating-stars/', '<table cellpadding');
    if TextBetween(Value3, '/top_250_films">', '</a>') <> '' then
      Value3 := '     ' + TextBetween(Value3, '/top_250_films">', '</a>')
    else
      Value3 := '';
//
Thanks a lot in advance.

Re: Three Lines Update

Posted: 2007-08-28 10:13:17
by bad4u
Try

Code: Select all

Value2 := TextBetween(PageText, '(<a href="ratings">', '</a>)');
if Pos('>Top 250: ', PageText) > 0 then
  Value3 := TextBetween(PageText, '>Top 250: ', '</a>')
else
  Value3 := '';
or this

Code: Select all

Value2 := TextBetween(PageText, '(<a href="ratings">', ' votes</a>)');
if Pos('>Top 250: #', PageText) > 0 then
  Value3 := TextBetween(PageText, '>Top 250: #',  '</a>')
else
  Value3 := '';
if you want the number as result only (without '#' and 'votes').

Posted: 2007-08-28 11:31:11
by DarKHawK
Thanks a lot bad4u