Three Lines Update

If you made a script you can offer it to the others here, or ask help to improve it. You can also report here bugs & problems with existing scripts.
Post Reply
DarKHawK
Posts: 9
Joined: 2003-10-17 01:19:36

Three Lines Update

Post 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.
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Re: Three Lines Update

Post 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').
DarKHawK
Posts: 9
Joined: 2003-10-17 01:19:36

Post by DarKHawK »

Thanks a lot bad4u
Post Reply