<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/7003" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2004-03-06T05:27:27-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/7003</id>

		<entry>
		<author><name><![CDATA[cvanmeer]]></name></author>
		<updated>2004-03-06T05:27:27-04:00</updated>

		<published>2004-03-06T05:27:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34291#p34291</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34291#p34291"/>
		<title type="html"><![CDATA[Grab 2 lines from WWW. Not working so good :S]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34291#p34291"><![CDATA[
Hi guys,<br><br>I want to strip some data from a webpage.<br>Now the problem is, the data I want, is always in de the same line, but not in the exact same place at all times.<br>My problems concerns 2 lines:<br><br>Line 1: <div class="codebox"><p>Code: </p><pre><code>&lt;tr&gt;&lt;td bgcolor=#B8C5E2 align=right&gt; &lt;/td&gt;&lt;td bgcolor=#C9D3E9&gt;Total number of page views up till now&lt;/td&gt;&lt;td nowrap bgcolor=#C9D3E9&gt;145683&lt;/td&gt;&lt;/tr&gt;</code></pre></div>Line 2: <div class="codebox"><p>Code: </p><pre><code>&lt;tr&gt;&lt;td bgcolor=#B8C5E2 align=right&gt; &lt;/td&gt;&lt;td bgcolor=#C9D3E9&gt;6 March 2004&lt;/td&gt;&lt;td align=right bgcolor=#C9D3E9&gt;342&lt;/td&gt;&lt;/tr&gt;</code></pre></div>I suspect line 1 is the easiest. I want to grab the total number of page views. In this example: 145683<br>The way I do this now (and not working correctly) is this:<br><div class="codebox"><p>Code: </p><pre><code> set url1 "http://www.nedstatbasic.net/s?tab=1&amp;link=1&amp;id=2532130" set temp1 [http::geturl $url1 -timeout 5000] set data1 [http::data $temp1] set stap1 [split $data1 \n] set l1stap2 [lindex $stap1 115] set l1stap3 [string range $l1stap2 0 [expr [strlen $l1stap2]-11]] set l1stap4 [string range $l1stap3 137 end] set hits $l1stap4</code></pre></div>I think it has to be a sort of regexp, but I don't know how.<br><br>The second line is the most variable, because of the changing data in the line. In this example line I want to capture: 342<br><br>Could someone help me?<br><br>thx.<br><br>Chrizz<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4215">cvanmeer</a> — Sat Mar 06, 2004 5:27 am</p><hr />
]]></content>
	</entry>
	</feed>
