Page 1 of 1

SCRIPT - HELP! how to catch lines from an other page...

Posted: 2005-10-03 15:43:43
by ABNormal
i have to open a 2nd page where i find these lines:

Code: Select all

<font face="arial,helvetica" size="2"><b>TITLE</b><br>
L'intento è chiaro. Il mondo (USA in primis) ha bisogno di eroi tutto
muscoli e cinismo. Gli uomini invincibili dal cuore d'oro ormai hanno
fatto il loro tempo (007 da tempo canta la sua agonia), largo alla
nuova generazione di spaccatutto che non sbaglia una missione e il cui
nome non può che incutere timore. Largo insomma agli XXX dalla pelle
d'amianto capaci di saltare da un auto in corsa per finire in un treno
ancor più veloce come se nulla fosse e che evadono da un carcere di
massima sicurezza come se si stesse giocando ai quattro cantoni...
<br><br>
<a class="filmup" href="opinioni.htm">Scrivi la tua recensione!</a></font>
i'ld like to import from this "other-page" every line between (and excluded):

Code: Select all

<font face="arial,helvetica" size="2"><b>TITLE</b><br>
and

Code: Select all

<a class="filmup" href="opinioni.htm">
if i use:

Code: Select all

    Line := GetLineFromOtherPage(NomeHtml,'<font face="arial,helvetica" size="2">');
but, in this way, i only read the line before what i'm looking for.
is there a way to import all lines i wrote before (or, better, all the lines between that 2 excluded lines)?

thx

ABN

Posted: 2005-10-03 18:44:09
by antp
I do not know what's this function "GetLineFromOtherPage", but you can use the function "TextBetween" from the StringUtils1 unit (add "uses StringUtils1" to your script if it is not yet done).
And then do:

Code: Select all

Line := TextBetween(NomeHtml, '<font face="arial,helvetica" size="2">', '<a class="filmup" href="opinioni.htm">');

Posted: 2005-10-05 18:32:34
by ABNormal
true my master ;) but TextBetween is possible on tha main page u're using.
the info i have to read comes from a second page.

Posted: 2005-10-05 19:16:05
by antp
:??: Once the page is downloaded you do what you want with it

Posted: 2005-10-05 22:03:04
by ABNormal
.... with a GetPage() option, of course.
now i've noticed it and used it into filmup script.

thx Antoine but, as you know, i don't know this language. I only read how previous scripts are written and try to understand where and how infos are taken from HTML pages.

but i'm a good student.....

thx for your help (when you wrote that GetLineFromOtherPage() wasn't a standard function i went to understand how that function worked, into script. i found GetPage() and used it)

WOW... I LOVE THIS GAME :hihi:

Posted: 2005-10-06 07:38:07
by antp
You learn well ;)