Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Searching web page by line

 [1/2] from: David_A_Brown::vanguard::com at: 6-May-2003 11:06


I am trying to search a web page and if I find two strings on the same line of html text perform an action: I've tried page: read http://www.xyz.com/ /lines if find page "string1" and "string2" [write %file page] and page: read http://www.xyz.com/ /lines if find page "string1" [ if find page "string2" [ write %file page ] ] I have a related question. How do you search sequentially thru a web page and set a Boolean value if you encounter a string then do an action if you find another string later. Thanks.

 [2/2] from: tomc:darkwing:uoregon at: 6-May-2003 14:08


Hi, refinements are appended to the word they are refineing so read/lines spec nor read spec /lines that would help both or your attempts, another way is with 'parse page: read/lines http://www.xyz.com/ rule: [thru "string one" thru "string two" to end] foreach line page[ if parse line rule [do-action]] to generalise to the whole page without limiting the occurances to a line. if parse read http://www.xyz.com/ rule [do-action] On Tue, 6 May 2003 [David_A_Brown--vanguard--com] wrote: