<?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/15524" />

	<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>2008-03-17T23:52:38-04:00</updated>

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

		<entry>
		<author><name><![CDATA[theice]]></name></author>
		<updated>2008-03-17T19:17:24-04:00</updated>

		<published>2008-03-17T19:17:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81873#p81873</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81873#p81873"/>
		<title type="html"><![CDATA[parsing this website]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81873#p81873"><![CDATA[
your way didn't completly work, but thanks you got me where I needed =]<br><div class="codebox"><p>Code: </p><pre><code>regexp {&lt;div class="dlc_week"&gt;(.*?)&lt;/div&gt;} $data - week putserv "PRIVMSG $c :$week" regexp {&lt;table class="dlc_table".*?&gt;(.*?)&lt;/table&gt;} $data - data foreach tr [regexp -all -inline {&lt;tr class="dlc_info_row"&gt;.*?&lt;/tr&gt;} $data] {   regexp {&lt;tr class="dlc_info_row"&gt;.*?&lt;td&gt;(.+?)&lt;/td&gt;.*?&lt;td&gt;(.+?)&lt;/td&gt;.*?&lt;td&gt;(.+?)&lt;/td&gt;} $tr - artist title type   putserv "PRIVMSG $c :$artist - $title ($type)" }http::cleanup $data}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9778">theice</a> — Mon Mar 17, 2008 7:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-03-17T23:52:38-04:00</updated>

		<published>2008-03-17T17:58:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81872#p81872</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81872#p81872"/>
		<title type="html"><![CDATA[parsing this website]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81872#p81872"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code># your headerregexp {&lt;div class="dlc_week"&gt;(.*?)&lt;/div&gt;} $data - weekputserv "PRIVMSG $c :$week"# slim our html down to just that one weekregexp {&lt;table class="dlc_table".*?&gt;(.*?)&lt;/table&gt;} data - $data# parse as usualforeach tr [regexp -all -inline {&lt;tr class="dlc_info_row"&gt;.*?&lt;/tr&gt;} $data] {  regexp {&lt;tr class="dlc_info_row"&gt;.*?&lt;td&gt;(.+?)&lt;/td&gt;.*?&lt;td&gt;(.+?)&lt;/td&gt;.*?&lt;td&gt;(.+?)&lt;/td&gt;} $data - artist title type  putserv "PRIVMSG $c :$artist - $title ($type)"}</code></pre></div>edit: corrected obvious mistake... future glances can see this as correct now.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Mon Mar 17, 2008 5:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[theice]]></name></author>
		<updated>2008-03-17T15:49:19-04:00</updated>

		<published>2008-03-17T15:49:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81870#p81870</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81870#p81870"/>
		<title type="html"><![CDATA[parsing this website]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81870#p81870"><![CDATA[
that works great, but what I was trying to figure out is how to make it only paste the first weeks information, it keeps going until it runs out of songs, when I want it to stop after it reaches the first &lt;/table&gt;<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9778">theice</a> — Mon Mar 17, 2008 3:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-03-17T15:00:49-04:00</updated>

		<published>2008-03-17T15:00:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81867#p81867</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81867#p81867"/>
		<title type="html"><![CDATA[parsing this website]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81867#p81867"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>foreach tr [regexp -all -inline {&lt;tr class="dlc_info_row"&gt;.*?&lt;/tr&gt;} $data] {     regexp {&lt;td&gt;(.+?)&lt;/td&gt;.*?&lt;td&gt;(.+?)&lt;/td&gt;.*?&lt;td&gt;(.+?)&lt;/td&gt;} $tr - artist title type     putserv "PRIVMSG $c :$artist - $title ($type)"}</code></pre></div>You goofed user's help. This corrects your goof. Don't change it this time.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Mon Mar 17, 2008 3:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[theice]]></name></author>
		<updated>2008-03-17T13:21:06-04:00</updated>

		<published>2008-03-17T13:21:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81864#p81864</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81864#p81864"/>
		<title type="html"><![CDATA[parsing this website]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81864#p81864"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>regexp {&lt;div class="dlc_week"&gt;(.*?)&lt;/div&gt;} $data - weekputserv "PRIVMSG $c :$week" foreach tr [regexp -all -inline {&lt;tr class="dlc_info_row"&gt;.*?&lt;/table&gt;} $data] { regexp {&lt;tr class="dlc_info_row"&gt;.*?&lt;td&gt;(.+?)&lt;/td&gt;.*?&lt;td&gt;(.+?)&lt;/td&gt;.*?&lt;td&gt;(.+?)&lt;/td&gt;} $data - artist title type putserv "PRIVMSG $c :$artist - $title ($type)"}http::cleanup $data}</code></pre></div>deff not working iight<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9778">theice</a> — Mon Mar 17, 2008 1:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2008-03-17T08:17:17-04:00</updated>

		<published>2008-03-17T08:17:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81850#p81850</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81850#p81850"/>
		<title type="html"><![CDATA[parsing this website]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81850#p81850"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>foreach tr [regexp -all -inline {&lt;tr class="dlc_info_row"&gt;.*?&lt;/tr&gt;} $data] {# put your regexp to extract details from $tr here}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Mon Mar 17, 2008 8:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[theice]]></name></author>
		<updated>2008-03-16T23:42:18-04:00</updated>

		<published>2008-03-16T23:42:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81839#p81839</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81839#p81839"/>
		<title type="html"><![CDATA[parsing this website]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81839#p81839"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>regexp {&lt;tr class="dlc_info_row"&gt;.*?&lt;td&gt;(.*?)&lt;/td&gt;.*?&lt;td&gt;(.*?)&lt;/td&gt;.*?&lt;td&gt;(.*?)&lt;/td&gt;} $data - artist title type</code></pre></div><br>ended up being the code thanks to you rosc2112...<br><br>but I can't come up with a good way to keep grabbing more songs until I get to &lt;/table&gt;<br><br>this is how the page is laid out.<br><br><div class="codebox"><p>Code: </p><pre><code>&lt;tr class="dlc_label_row"&gt;&lt;td width="45%"&gt;Band&lt;/td&gt;&lt;td width="40%"&gt;Song&lt;/td&gt;&lt;td width="15%"&gt;Type&lt;/td&gt;&lt;/tr&gt;&lt;tr class="dlc_info_row"&gt;&lt;td&gt;*&lt;/td&gt; #Artist&lt;td&gt;*&lt;/td&gt; #Title&lt;td&gt;*&lt;/td&gt; #Type&lt;/tr&gt;&lt;tr class="dlc_credits_row"&gt;&lt;td colspan="3"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class="dlc_info_row"&gt;&lt;td&gt;*&lt;/td&gt; #Artist&lt;td&gt;*&lt;/td&gt; #Title&lt;td&gt;*&lt;/td&gt; #Type&lt;/tr&gt;&lt;tr class="dlc_credits_row"&gt;&lt;td colspan="3"&gt; “CrushCrushCrush” as performed by Paramore courtesy of Warner Music Group&lt;br /&gt;Hayley Williams and Josh Farro&lt;br /&gt;2007 WB Music Corp. (Ascap), But Father, I Just Want To Sing Music (ASCAP), FBR Music (ASCAP) And Josh's Music (ASCAP) All rights reserved.  Used by permission&lt;/td&gt;&lt;/tr&gt;&lt;tr class="dlc_info_row"&gt;&lt;td&gt;*&lt;/td&gt; #Artist&lt;td&gt;*&lt;/td&gt; #Title&lt;td&gt;*&lt;/td&gt; #Type&lt;/tr&gt;&lt;tr class="dlc_credits_row"&gt;&lt;td colspan="3"&gt; “Beethoven’s C***” as performed by Serjical Strike courtesy of Warner Music Group&lt;br /&gt;Serj Tankian&lt;br /&gt;2007 Stunning Suppository Sounds (BMI)All Rights Administered By Warner Tamerlane Publishing Corp.&lt;br /&gt;All rights reserved.  Used by permission&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</code></pre></div>the *'s are what I want, the problem is this page is updated each week, and the format will stay the same, but the amount of songs wont. so idk what to do<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9778">theice</a> — Sun Mar 16, 2008 11:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2008-03-16T15:03:06-04:00</updated>

		<published>2008-03-16T15:03:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81821#p81821</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81821#p81821"/>
		<title type="html"><![CDATA[parsing this website]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81821#p81821"><![CDATA[
Try this, as one line:<div class="codebox"><p>Code: </p><pre><code>regexp {&lt;tr class="dlc_info_row"&gt;.*?&lt;td&gt;(.*?)&lt;/td&gt;} $data - artist </code></pre></div>Newlines are just another char in regexp. And, the tcl parser isn't going to work properly if you have newlines in the middle of a regexp (unless perhaps if you escape them so the parser knows to continue reading the next line as part of the previous.)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Sun Mar 16, 2008 3:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[theice]]></name></author>
		<updated>2008-03-15T22:39:35-04:00</updated>

		<published>2008-03-15T22:39:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81798#p81798</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81798#p81798"/>
		<title type="html"><![CDATA[parsing this website]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81798#p81798"><![CDATA[
still not having and luck with the multi line parsing<br><br>its hard:<br><div class="codebox"><p>Code: </p><pre><code>regexp {&lt;div class="dlc_week"&gt;(.*?)&lt;/div&gt;} $data - weekputserv "PRIVMSG $c :$week" regexp {&lt;tr class="dlc_info_row"&gt;        &lt;td&gt;(.+?)&lt;/td&gt;} $data - artist    putserv "PRIVMSG $c :$artist"http::cleanup $data</code></pre></div><br>was what I was trying with no luck<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9778">theice</a> — Sat Mar 15, 2008 10:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[theice]]></name></author>
		<updated>2008-03-15T04:46:14-04:00</updated>

		<published>2008-03-15T04:46:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81773#p81773</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81773#p81773"/>
		<title type="html"><![CDATA[parsing this website]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81773#p81773"><![CDATA[
this is easier than I thought-<br><br>so far Ive been able to grab the week via:<br><div class="codebox"><p>Code: </p><pre><code>regexp {&lt;div class="dlc_week"&gt;(.*?)&lt;/div&gt;} $data - week</code></pre></div>now I just have to figure out how to make it read the other info.<br><br>having trouble getting the artist / song / type <br><br>if someone can help me<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9778">theice</a> — Sat Mar 15, 2008 4:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[theice]]></name></author>
		<updated>2008-03-15T03:35:30-04:00</updated>

		<published>2008-03-15T03:35:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81770#p81770</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81770#p81770"/>
		<title type="html"><![CDATA[Re: Connecting to websites in tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81770#p81770"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>but I couldn't find anywhere how to easily open a connecting to a website and parse the information.</div></blockquote>Are you kidding?<br><br>You mean, out of all the hundreds of web-parsing script topics here, and all the web-parsing scripts in the archive, you couldn't find one example of how to grab/parse a website?</div></blockquote>sorry I guess I didn't look aroung very much. I'm dumb.<br><br>I think it would be cool just to have the current week, once I figured out how to do that maybe in the future I would write something to be like Last 3 Weeks Downloaded Content!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9778">theice</a> — Sat Mar 15, 2008 3:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DragnLord]]></name></author>
		<updated>2008-03-15T03:33:26-04:00</updated>

		<published>2008-03-15T03:33:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81769#p81769</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81769#p81769"/>
		<title type="html"><![CDATA[parsing this website]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81769#p81769"><![CDATA[
Do you want all the weeks, or just the latest?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4461">DragnLord</a> — Sat Mar 15, 2008 3:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2008-03-15T02:47:05-04:00</updated>

		<published>2008-03-15T02:47:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81768#p81768</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81768#p81768"/>
		<title type="html"><![CDATA[Re: Connecting to websites in tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81768#p81768"><![CDATA[
<blockquote class="uncited"><div>but I couldn't find anywhere how to easily open a connecting to a website and parse the information.</div></blockquote>Are you kidding?<br><br>You mean, out of all the hundreds of web-parsing script topics here, and all the web-parsing scripts in the archive, you couldn't find one example of how to grab/parse a website?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Sat Mar 15, 2008 2:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[theice]]></name></author>
		<updated>2008-03-15T05:57:45-04:00</updated>

		<published>2008-03-14T19:41:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81759#p81759</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81759#p81759"/>
		<title type="html"><![CDATA[parsing this website]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81759#p81759"><![CDATA[
I'm new to tcl as you know...<br><br>but I couldn't find anywhere how to easily open a connecting to a website and parse the information.<br><br><a href="http://www.rockband.com/dlc" class="postlink">http://www.rockband.com/dlc</a>  is the website I want to open<br><div class="codebox"><p>Code: </p><pre><code>&lt;/style&gt;&lt;div class="dlc_week"&gt;=== Week 17 ===&lt;/div&gt;&lt;tr class="dlc_info_row"&gt;&lt;td&gt;Black Tide&lt;/td&gt;&lt;td&gt;Shockwave&lt;/td&gt;&lt;/tr&gt;&lt;tr class="dlc_info_row"&gt;&lt;td&gt;Paramore&lt;/td&gt;&lt;td&gt;Crushcrushcrush&lt;/td&gt;&lt;td&gt;Master&lt;/td&gt;&lt;/tr&gt;&lt;tr class="dlc_info_row"&gt;&lt;td&gt;Serj Tankian&lt;/td&gt;&lt;td&gt;Beethoven's C***&lt;/td&gt;&lt;td&gt;Master&lt;/td&gt;&lt;/tr&gt;</code></pre></div>is the information on the website I want to grab ie:<br>set to this:<br><div class="codebox"><p>Code: </p><pre><code>&lt;/style&gt;&lt;div class="dlc_week"&gt;$week&lt;/div&gt;&lt;tr class="dlc_info_row"&gt;&lt;td&gt;$artist&lt;/td&gt;&lt;td&gt;$song&lt;/td&gt;&lt;td&gt;$type&lt;/td&gt;&lt;/tr&gt;</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9778">theice</a> — Fri Mar 14, 2008 7:41 pm</p><hr />
]]></content>
	</entry>
	</feed>
