i'm in need of an example for looping thru html - 09/10/06 02:17 PM
hello all...
ok, i've nearly out of hair from this.. i've been searching all the sites looking for examples of how to do this..
i'm trying to loop thru some specific html text. i know i've mentioned this before but here is the code i'm trying to parse..
<p><b>Popular Titles</b> (Displaying 3 Results)<ol><li> <a href="/title/tt0360717/" onclick="set_args('tt0360717',1,1)">King Kong</a> (2005)<br> aka <em>"Peter Jackson's King Kong"</em> - USA <em>(promotional title)</em></li>
<li> <a href="/title/tt0024216/" onclick="set_args('tt0024216',2,1)">King Kong</a> (1933)</li>
<li> <a href="/title/tt0074751/" onclick="set_args('tt0074751',3,1)">King Kong</a> (1976)<br> aka <em>"King Kong: The Legend Reborn"</em> - USA <em>(working title)</em></li>
</ol>
</p>
so like is says would someone be able to give an example of how this is done?
i've been trying stuff sim to this (this is the last bit i've tried)
but it only parses the first thing come comes up with...
and also could someone maybe make a suggestion on how to catch the Displaying 3 Results portion also?? if not, tis alright..
thanks in advance
ok, i've nearly out of hair from this.. i've been searching all the sites looking for examples of how to do this..
i'm trying to loop thru some specific html text. i know i've mentioned this before but here is the code i'm trying to parse..
<p><b>Popular Titles</b> (Displaying 3 Results)<ol><li> <a href="/title/tt0360717/" onclick="set_args('tt0360717',1,1)">King Kong</a> (2005)<br> aka <em>"Peter Jackson's King Kong"</em> - USA <em>(promotional title)</em></li>
<li> <a href="/title/tt0024216/" onclick="set_args('tt0024216',2,1)">King Kong</a> (1933)</li>
<li> <a href="/title/tt0074751/" onclick="set_args('tt0074751',3,1)">King Kong</a> (1976)<br> aka <em>"King Kong: The Legend Reborn"</em> - USA <em>(working title)</em></li>
</ol>
</p>
so like is says would someone be able to give an example of how this is done?
i've been trying stuff sim to this (this is the last bit i've tried)
Code:
on *:sockread:movieinfo1:{ if ($sockerr > 0) return else { var %tmptxt sockread -f %tmptxt if (Location: isin %tmptxt) { set %movieinfolink2 $remove(%tmptxt,Location: http://www.imdb.com) sockopen movieinfo2 www.imdb.com 80 } else { if ($sockerr > 0) return var %tmptxt :repeat sockread %tmptxt if ($sockbr == 0) return if (<p><b>Popular Titles</b> isin %tmptxt) { echo -a $htmlconv(%tmptxt) sockclose movieinfo1 } else goto repeat }
but it only parses the first thing come comes up with...
and also could someone maybe make a suggestion on how to catch the Displaying 3 Results portion also?? if not, tis alright..
thanks in advance