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

	<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>2006-09-21T19:53:12-04:00</updated>

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

		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-09-21T19:53:12-04:00</updated>

		<published>2006-09-21T19:53:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66528#p66528</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66528#p66528"/>
		<title type="html"><![CDATA[Script to pubmsg webpage titles from pasted urls]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66528#p66528"><![CDATA[
Take a look at the tinyurl script, that'll give you some ideas for using pubm for grabbing urls:<br><br><a href="http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&amp;id=1259" class="postlink">http://www.egghelp.org/cgi-bin/tcl_arch ... ad&amp;id=1259</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Thu Sep 21, 2006 7:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spankymcfresh]]></name></author>
		<updated>2006-09-21T09:26:52-04:00</updated>

		<published>2006-09-21T09:26:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66520#p66520</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66520#p66520"/>
		<title type="html"><![CDATA[Script to pubmsg webpage titles from pasted urls]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66520#p66520"><![CDATA[
That is exactly what I wanted but wasn't searching for the right key words. Thanks!<br><br>I'm not sure how cpu intensive this will be, but I've changed it so that it scans everything said and runs the procedure. This appears to work for triggering without a space/keyword bind, though it strikes me as a nasty way to go about it. Any ideas anyone?<br><div class="codebox"><p>Code: </p><pre><code>putlog "loaded: url.tcl (lists url titles from channel - thanks to rosc2112)"package require http 2.3bind pubm - * webcheckproc webcheck {nick uhost hand chan text} {   foreach i $text {      if {([string match "*http://*" $i]) || ([string match "*www.*" $i])} {              set url [string trim $i]              set url [split $url]              regsub -all {http://+} $url "" url              catch {set page [::http::geturl $url -timeout 90000]} error              set html [::http::data $page]              ::http::cleanup $page              foreach line {[split $html \n]} {                if {[regexp -nocase {&lt;title&gt;(.*?)&lt;/title&gt;} $html match titlematch]} {                    regsub -all {&amp;+} $titlematch "&amp;" titlematch                      if { ([string match "*302*" $titlematch])} {                    } else {putserv "PRIVMSG $chan :^BURL title:^B [join $titlematch]" }                 }}    }    }   }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8216">spankymcfresh</a> — Thu Sep 21, 2006 9:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-09-20T20:04:20-04:00</updated>

		<published>2006-09-20T20:04:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66504#p66504</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66504#p66504"/>
		<title type="html"><![CDATA[Script to pubmsg webpage titles from pasted urls]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66504#p66504"><![CDATA[
I've posted several sample scripts on how to retrieve data from webpages, like: <br><a href="http://forum.egghelp.org/viewtopic.php?p=64426#64426" class="postlink">http://forum.egghelp.org/viewtopic.php?p=64426#64426</a><br><br>You'd just be regexp searching for <div class="codebox"><p>Code: </p><pre><code>{&lt;title&gt;(.*?)&lt;/title&gt;}</code></pre></div>Ohh, and using $text as the $url  (which could be slightly dangerous allowing users to inject their own strings/urls into that...)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Wed Sep 20, 2006 8:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spankymcfresh]]></name></author>
		<updated>2006-09-20T17:23:44-04:00</updated>

		<published>2006-09-20T17:23:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66498#p66498</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66498#p66498"/>
		<title type="html"><![CDATA[Script to pubmsg webpage titles from pasted urls]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66498#p66498"><![CDATA[
Anyone know of a simple script that will just publicly message the titles of urls pasted in a channel? <br><br>Thanks!  :oops:<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8216">spankymcfresh</a> — Wed Sep 20, 2006 5:23 pm</p><hr />
]]></content>
	</entry>
	</feed>
