Invador
11.09.2005, 14:55
Hallo Leute!
Hat jemand von euch schonmal ein froogle- oder geizhalsscript gebaut? Ich will dies gerne machen, nur leider weiß ich nicht wie ich das machen soll. habe hier zwar nen ggogle script und wollte dies dann auf froogle umbauen, aber leider klappt das nicht so ganz.
evtl kann ja jemand den code so bearbeiten, das dies funktioniert.
bind pub - !google pub:google
bind pub - !froogle pub:froogle
set agent "Mozilla"
proc pub:google { nick uhost handle channel arg } {
global agent
if {[llength $arg]==0} {
putserv "PRIVMSG $channel :4»1 !google Stichwort"
} else {
set query "http://www.google.de/search?btnI=&q="
for { set index 0 } { $index<[llength $arg] } { incr index } {
set query "$query[lindex $arg $index]"
if {$index<[llength $arg]-1} then {
set query "$query+"
}
}
#putserv "PRIVMSG $channel :$query"
set token [http::config -useragent $agent]
set token [http::geturl $query]
puts stderr ""
upvar #0 $token state
set max 0
foreach {name value} $state(meta) {
if {[regexp -nocase ^location$ $name]} {
set newurl [string trim $value]
putserv "PRIVMSG $channel :4»1 $newurl"
}
}
}
}
proc pub:froogle { nick uhost handle channel arg } {
global agent
if {[llength $arg]==0} {
putserv "PRIVMSG $channel :4»1 !froogle Stichwort"
} else {
set query "http://froogle.google.de/froogle?svnum=10&hl=de&lr=&q="
for { set index 0 } { $index<[llength $arg] } { incr index } {
set query "$query[lindex $arg $index]"
if {$index<[llength $arg]-1} then {
set query "$query+"
}
}
#putserv "PRIVMSG $channel :$query"
set token [http::config -useragent $agent]
set token [http::geturl $query]
puts stderr ""
upvar #0 $token state
set max 0
foreach {name value} $state(meta) {
if {[regexp -nocase ^location$ $name]} {
set newurl [string trim $value]
putserv "PRIVMSG $channel :4»1 $newurl"
}
}
}
}
und schön wäre es natürlich auch, wen jemand noch ne idee für geizhals hätte :)
mfg, Invador
Hat jemand von euch schonmal ein froogle- oder geizhalsscript gebaut? Ich will dies gerne machen, nur leider weiß ich nicht wie ich das machen soll. habe hier zwar nen ggogle script und wollte dies dann auf froogle umbauen, aber leider klappt das nicht so ganz.
evtl kann ja jemand den code so bearbeiten, das dies funktioniert.
bind pub - !google pub:google
bind pub - !froogle pub:froogle
set agent "Mozilla"
proc pub:google { nick uhost handle channel arg } {
global agent
if {[llength $arg]==0} {
putserv "PRIVMSG $channel :4»1 !google Stichwort"
} else {
set query "http://www.google.de/search?btnI=&q="
for { set index 0 } { $index<[llength $arg] } { incr index } {
set query "$query[lindex $arg $index]"
if {$index<[llength $arg]-1} then {
set query "$query+"
}
}
#putserv "PRIVMSG $channel :$query"
set token [http::config -useragent $agent]
set token [http::geturl $query]
puts stderr ""
upvar #0 $token state
set max 0
foreach {name value} $state(meta) {
if {[regexp -nocase ^location$ $name]} {
set newurl [string trim $value]
putserv "PRIVMSG $channel :4»1 $newurl"
}
}
}
}
proc pub:froogle { nick uhost handle channel arg } {
global agent
if {[llength $arg]==0} {
putserv "PRIVMSG $channel :4»1 !froogle Stichwort"
} else {
set query "http://froogle.google.de/froogle?svnum=10&hl=de&lr=&q="
for { set index 0 } { $index<[llength $arg] } { incr index } {
set query "$query[lindex $arg $index]"
if {$index<[llength $arg]-1} then {
set query "$query+"
}
}
#putserv "PRIVMSG $channel :$query"
set token [http::config -useragent $agent]
set token [http::geturl $query]
puts stderr ""
upvar #0 $token state
set max 0
foreach {name value} $state(meta) {
if {[regexp -nocase ^location$ $name]} {
set newurl [string trim $value]
putserv "PRIVMSG $channel :4»1 $newurl"
}
}
}
}
und schön wäre es natürlich auch, wen jemand noch ne idee für geizhals hätte :)
mfg, Invador