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

	<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>2013-02-09T07:45:54-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Football]]></name></author>
		<updated>2013-02-09T07:45:54-04:00</updated>

		<published>2013-02-09T07:45:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100943#p100943</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100943#p100943"/>
		<title type="html"><![CDATA[News Now Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100943#p100943"><![CDATA[
Maybe someone else could help?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10393">Football</a> — Sat Feb 09, 2013 7:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Football]]></name></author>
		<updated>2013-01-09T14:59:33-04:00</updated>

		<published>2013-01-09T14:59:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100557#p100557</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100557#p100557"/>
		<title type="html"><![CDATA[News Now Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100557#p100557"><![CDATA[
hey doggo,<br><br>Any chance for a few adjustments for the script? while running the script on the eggdrop it seems to take a lot of CPU and when I mean a lot I mean atleast 40%, sometimes even more.<br><br>could you add an update interval and how many results to return each time an update occurs (like every X minutes it will retrieve the latest Y search items?)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10393">Football</a> — Wed Jan 09, 2013 2:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[doggo]]></name></author>
		<updated>2012-07-22T08:58:30-04:00</updated>

		<published>2012-07-22T08:58:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99767#p99767</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99767#p99767"/>
		<title type="html"><![CDATA[News Now Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99767#p99767"><![CDATA[
cool  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11046">doggo</a> — Sun Jul 22, 2012 8:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Football]]></name></author>
		<updated>2012-07-22T01:52:21-04:00</updated>

		<published>2012-07-22T01:52:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99765#p99765</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99765#p99765"/>
		<title type="html"><![CDATA[News Now Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99765#p99765"><![CDATA[
Thats some good [censored] right there mate, exactly what I wanted and it works splendid! thanks so much!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10393">Football</a> — Sun Jul 22, 2012 1:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[doggo]]></name></author>
		<updated>2012-07-22T06:44:18-04:00</updated>

		<published>2012-07-21T17:27:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99758#p99758</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99758#p99758"/>
		<title type="html"><![CDATA[News Now Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99758#p99758"><![CDATA[
i gave it a go for you, left it running for a while and it seems to work fine lots of news was posted anyways <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> see here <a href="http://pastebin.com/raw.php?i=YdZjUFgu" class="postlink">http://pastebin.com/raw.php?i=YdZjUFgu</a><br><br>what it does is check this part of the page <a href="http://i.imgur.com/DETiC.png" class="postlink">http://i.imgur.com/DETiC.png</a> for ne articles stores the info in a .txt file so only announces the article once in channel. also worked in a cache to remove articles announced over ten mins ago so the txt file wont become massive!<br><br>here it is <br><div class="codebox"><p>Code: </p><pre><code># newsnow.tcl# by doggo #omgwtfnzbs@EFNET#########################package require http bind time -|- "*" newsnowuk:newsset infochan "#yourchannel"set baseurl "http://www.newsnow.co.uk"set dupes "logs/newsnow_dupes.txt"proc newsnowuk:news {min hour day month year} { global infochan baseurl dupesif {![file exists $dupes]} {    set file [open $dupes "w"]    close $file } set url "http://www.newsnow.co.uk/h/Sport/Football"::http::config -useragent "Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.8.1) Gecko/2006101023 Firefox/2.0"set data [::http::geturl $url -timeout 5000]set xx [::http::data $data]::http::cleanup $xxregsub -all {\n} $xx {} xxregexp -nocase {&lt;div class="tsl"&gt;NEW in the last (.*?)&lt;/div&gt;(.*?)&lt;br.*} $xx match x1 x2 x3if {![info exists x2]} {return}regsub -all {&lt;/div&gt;} $x2 {|} x2foreach xxx [split $x2 "|"] { if {[string length $xxx]} { regexp -nocase {&lt;a href="(.*?)".*&gt;(.*?)&lt;/a&gt;&lt;span class=".*" ut=".*"&gt;&lt;b&gt;(.*?)&lt;/b&gt;} $xxx match x4 x5 x6set file [open $dupes r] set data [read $file] close $file set isdupe 0 foreach yy [split $data \n] { if {[string length $yy]} { set now [clock seconds]set cache [lindex $yy 0]set article [lindex $yy 1]incr now -$cache        if { [string match -nocase "*$x4*" "$yy"] == 1 } {             set isdupe 1         } if {$now&gt;600} {set rmv [newsnowuk:cache $cache $dupes]putlog "removing news article $article from cache"  }  }}catch {unset data} if {$isdupe != 1} { set x5 [newsnowuk:htmlcodes $x5]regsub -all {\s+} $x5 " " x5regsub -all {\–} $x5 "-" x5regsub -all {\’|\‘} $x5 "\'" x5set open_text [open $dupes "a"]puts $open_text "[clock seconds] $x4"close $open_textputhelp "privmsg $infochan :$x5 - $baseurl$x4"   }   } }}proc newsnowuk:cache {id fname} { set data ""set input [open $fname r]while {![eof $input]} {set curline [gets $input];set curline [split $curline]if {$curline != ""} {set data [linsert $data end $curline] }}catch {close $input}set mark -1;set match ""foreach line $data {incr markif {[lindex $line 0] == $id} {set match $markbreak }}if {$match == ""} {return}set newdata [lreplace $data $mark $mark]set output [open $fname w]foreach newline $newdata {if {$newline != ""} {puts $output $newline }}flush $outputcatch {close $output}}#borrowed from a imdb.tclproc newsnowuk:htmlcodes {content} { if {$content == ""} { return "n/a"; } if {![string match *&amp;* $content]} { return $content; } set escapes {   \x20 " \x22 &amp; \x26 &amp;apos; \x27 – \x2D &lt; \x3C &gt; \x3E ˜ \x7E € \x80 ¡ \xA1 ¢ \xA2 £ \xA3 ¤ \xA4 ¥ \xA5 ¦ \xA6 § \xA7 ¨ \xA8 © \xA9 ª \xAA « \xAB ¬ \xAC ­ \xAD ® \xAE &amp;hibar; \xAF ° \xB0 ± \xB1 ² \xB2 ³ \xB3 ´ \xB4 µ \xB5 ¶ \xB6 · \xB7 ¸ \xB8 ¹ \xB9 º \xBA » \xBB ¼ \xBC ½ \xBD ¾ \xBE ¿ \xBF À \xC0 Á \xC1 Â \xC2 Ã \xC3 Ä \xC4 Å \xC5 Æ \xC6 Ç \xC7 È \xC8 É \xC9 Ê \xCA Ë \xCB Ì \xCC Í \xCD Î \xCE Ï \xCF Ð \xD0 Ñ \xD1 Ò \xD2 Ó \xD3 Ô \xD4 Õ \xD5 Ö \xD6 × \xD7 Ø \xD8 Ù \xD9 Ú \xDA Û \xDB Ü \xDC Ý \xDD Þ \xDE ß \xDF à \xE0 á \xE1 â \xE2 ã \xE3 ä \xE4 å \xE5 æ \xE6 ç \xE7 è \xE8 é \xE9 ê \xEA ë \xEB ì \xEC í \xED î \xEE ï \xEF ð \xF0 ñ \xF1 ò \xF2 ó \xF3 ô \xF4 õ \xF5 ö \xF6 ÷ \xF7 ø \xF8 ù \xF9 ú \xFA û \xFB ü \xFC ý \xFD þ \xFE ÿ \xFF }; set content [string map $escapes $content]; set content [string map [list "\]" "\\\]" "\[" "\\\[" "\$" "\\\$" "\\" "\\\\"] $content]; regsub -all -- {&amp;#([[:digit:]]{1,5});} $content {[format %c [string trimleft "\1" "0"]]} content; regsub -all -- {&amp;#x([[:xdigit:]]{1,4});} $content {[format %c [scan "\1" %x]]} content; regsub -all -- {&amp;#?[[:alnum:]]{2,7};} $content "?" content; return [subst $content]; } putlog "newsnow.tcl loaded!"</code></pre></div>enjoy  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11046">doggo</a> — Sat Jul 21, 2012 5:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Football]]></name></author>
		<updated>2012-07-20T12:16:04-04:00</updated>

		<published>2012-07-20T12:16:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99737#p99737</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99737#p99737"/>
		<title type="html"><![CDATA[News Now Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99737#p99737"><![CDATA[
Anyone?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10393">Football</a> — Fri Jul 20, 2012 12:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[doggo]]></name></author>
		<updated>2012-07-04T12:06:47-04:00</updated>

		<published>2012-07-04T12:06:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99669#p99669</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99669#p99669"/>
		<title type="html"><![CDATA[News Now Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99669#p99669"><![CDATA[
i just realized that after posting :/ <br><br>sorry<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11046">doggo</a> — Wed Jul 04, 2012 12:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Football]]></name></author>
		<updated>2012-07-04T12:05:21-04:00</updated>

		<published>2012-07-04T12:05:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99668#p99668</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99668#p99668"/>
		<title type="html"><![CDATA[News Now Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99668#p99668"><![CDATA[
It provides news from all their sections, I want news just from that specific one<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10393">Football</a> — Wed Jul 04, 2012 12:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[doggo]]></name></author>
		<updated>2012-07-04T12:04:33-04:00</updated>

		<published>2012-07-04T12:04:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99667#p99667</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99667#p99667"/>
		<title type="html"><![CDATA[News Now Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99667#p99667"><![CDATA[
use there twitter rss feed?<br><br><a href="https://twitter.com/statuses/user_timeline/68672354.rss" class="postlink">https://twitter.com/statuses/user_timeline/68672354.rss</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11046">doggo</a> — Wed Jul 04, 2012 12:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Football]]></name></author>
		<updated>2012-07-04T04:50:30-04:00</updated>

		<published>2012-07-04T04:50:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99665#p99665</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99665#p99665"/>
		<title type="html"><![CDATA[News Now Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99665#p99665"><![CDATA[
I was hoping this <a href="http://www.newsnow.co.uk/h/Sport/Football" class="postlink">website</a> has an rss feed I can use for that page, but it doesn't.<br><br>So is there any chance someone would be willing to write a script to send announcements with the headline &amp; link every time a new headline is announced on the website please? (A news script)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10393">Football</a> — Wed Jul 04, 2012 4:50 am</p><hr />
]]></content>
	</entry>
	</feed>
