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

	<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>2021-03-08T22:36:06-04:00</updated>

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

		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2021-03-08T22:36:06-04:00</updated>

		<published>2021-03-08T22:36:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109499#p109499</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109499#p109499"/>
		<title type="html"><![CDATA[Murf's Google.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109499#p109499"><![CDATA[
Now tbh, i have 0% knowledge of web retrieving, but i am trying this Script, and even added a putlog to it, but i get no results, any help is much appreciated <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br><br>As far as i currently see, the URL format seem's correct, but i am not 100% sure. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"> <br><div class="codebox"><p>Code: </p><pre><code>###############################################################################################################################################                        Google by Murf                               ##                            v1.0                                     ##                                                                     ##  Gets search results from Google.com. Nothing fancy yet, just gets  ##  however many returns you want.  Idea is based on a script by       ##  aNa|0Gue, although the code is all new.                            ##                                                                     ##                 Latest version @ http://www.blueday.org             ##                 Comments &amp; Questions to murf@mindless.com           #########################################################################  Only tested on TCL v8.3 and Egg v1.6x, although I kept the code    ##  generic enough for TCL v8.0 and probably v1.3 of egg.              #########################################################################                                                                     ##  Commands                                                           ##                                                                     ##          .google keyword(s) &lt;# of results&gt;                          ##                                                                     ##          e.g. .google murf 5                                        ##                                                                     ##   Version                                                           ##      v1.0 Aug 16 2002                                               ##         -- first version                                            ##                                                                     ##        Contact murf@mindless.com for bugs/comments                  ##        This and other scripts available @ www.blueday.org           ################################################################################################################################################# default number of returnsset google_def_num 4## max number of returnsset google_max 10## public bind set glpubbind .googleset gl_output "NOTICE $nick"##########binds######################bind pub -|- $glpubbind pub_google##########Procs######################proc pub_google {nick uhost handle chan search} {  global gl_ouput  set gl_output "NOTICE $nick"  if {[llength $search] == 0} {     puthelp "$gl_output : Whatcha searchin for fool!?"     return 0  }  set url [google_url $search $nick $chan]  google_getpage $url  return 0}## Google_url ############################################### Takes input and parses to set the url, returns the urlproc google_url {search nick chan} {  global google_def_num google_max gl_output  set google_num [lindex $search end]  if {[regexp { [0-9]+} $search match $google_num]} {     if {$google_num &gt; $google_max} { set google_num $google_max }     set search [lrange $search 0 [expr {[llength $search] - 2}]]  } else {     set google_num $google_def_num  }  if {$google_num &gt;= 5} {      set gl_output "NOTICE $nick"  } else {     set gl_output "PRIVMSG $chan"  }  regsub -all { } $search {+} search   set url "/search?hl=en&amp;num=$google_num&amp;lr=&amp;ie=ISO-8859-1&amp;q=$search"  return $url}## google_getpage ############################################ gets the webpage and parses for the returnsproc google_getpage {url} {   global gl_output## Open socket   if {[catch {set glsock [socket -async www.google.com 80]} sockerr]} {      puthelp "NOTICE $nick :$sockerr"      puthelp "NOTICE $nick :Try again later, look out the window till then!"      close $glsock      return 0   }   puts $glsock "GET $url"   flush $glsock   set i 0   set j 1   set glout [gets $glsock]  while {[regexp {Dissatisfied with your results?} $glout] == 0} {     set glout [gets $glsock]     incr i     if {$i &gt;= 150} {        break     }      if {[regexp {#008000&gt;(.*?) - } $glout match gl_result($j)]} {        #puthelp "$gl_output :$j. http://$gl_result($j)"        putlog "http://$gl_result($j)"        incr j     }  }  close $glsock  return 0}putlog "Google v1.0 by murf loaded"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12849">ComputerTech</a> — Mon Mar 08, 2021 10:36 pm</p><hr />
]]></content>
	</entry>
	</feed>
