albozz Voice
Joined: 12 Jul 2016 Posts: 8 Location: Albania
|
Posted: Tue Jan 12, 2021 5:57 pm Post subject: Horoscope help |
|
|
Hello i need help to thith hosroscope
| Code: | bind pub - !h horoskopi:shqip
package require http
set webi http://top-channel.tv/horoskopi
proc horoskopi:shqip { nick host hand chan text } {
global webi
set shenjaUser [lindex $text 0]
set shenja [string tolower $shenjaUser]
#NQS nuk shkruan shenjen, por ben vetem !h
if {$shenja == ""} {
putserv "NOTICE $nick Komanda eshte shembull: !h dashi"
}
#NQS shkruan vetem shenjat e horoskopit
if {[string match -nocase "dashi" $shenja] || [string match -nocase "demi" $shenja] || [string match -nocase "binjaket" $shenja] ||
[string match -nocase "gaforrja" $shenja] || [string match -nocase "luani" $shenja] || [string match -nocase "virgjeresha" $shenja] ||
[string match -nocase "peshorja" $shenja] || [string match -nocase "akrepi" $shenja] || [string match -nocase "shigjetari" $shenja] ||
[string match -nocase "bricjapi" $shenja] || [string match -nocase "ujori" $shenja] || [string match -nocase "peshqit" $shenja]} {
set c [::http::geturl $webi/[strftime "%d-%m-%Y"]/?shenja=$shenja]
set l [split [::http::data $c] "\n"]
::http::cleanup $c
set c 0
foreach x $l {
incr c
switch $c {
283 {
putnow "PRIVMSG #opers :$nick \002$shenja\002: [html $x]"
}
}
}
#NQS nuk shkruan shenjat e mesiperme, jepet ky errori
} else {
putserv "NOTICE $nick Komanda eshte shembull: !h dashi"
}
}
proc html { text } {
regsub -all "<p>" $text "" text
regsub -all "</p>" $text "" text
return $text
}
|
[22:39] (Eggdrop) albozz ujori: <li id="menu-item-18527" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-18527"><a href="https://top-channel.tv/artikuj/teknologji/">Teknologji</a></li>[/quote] |
|