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

If you need help on how to use the program
Post Reply
ABNormal
Posts: 135
Joined: 2005-01-08 08:33:38

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

Post 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
antp
Site Admin
Posts: 9677
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post 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">');
ABNormal
Posts: 135
Joined: 2005-01-08 08:33:38

Post 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.
antp
Site Admin
Posts: 9677
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

:??: Once the page is downloaded you do what you want with it
ABNormal
Posts: 135
Joined: 2005-01-08 08:33:38

Post 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:
antp
Site Admin
Posts: 9677
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

You learn well ;)
Post Reply