Completely redid it as the previous site , which did work , never updated and gave the same horoscope everyday. I have since altered it to get the one from the NewYork Post. It still uses the previous site for retrieving the dates the sign covers.
Usage: !horoscope sign
Update: Jan 18th 2009: Added $lower($2) in the trigger event. Added the dates the sign covers in the script.
Update Jan 18th 2009: Completely redid it to use a site that actually updates the horoscopes.
Update Jan 29th 2009: Had to redo it again as the site decided to not work at times.
Update Feb 11th 2009: Redid it yet again using another site as previous site altered the location of the stuff to much.
Update Sep 14th 2011: Redid entire script as site changed, yet again....
on *:text:!horoscope*:#: {
if ($group(#horoscope).status == on) { msg $chan Please wait a few moments. }
if ($group(#horoscope).status == off) {
if ($istok(Aquarius.Pisces.Aries.Taurus.Gemini.Cancer.Leo.Virgo.Libra.Scorpio.Sagittarius.Capricorn,$2,46)) {
set %horosign $lower($2) | set %horochan $chan
sockopen horoscope shine.yahoo.com 80
.enable #horoscope
}
if (!$2 || !$istok(Aquarius.Pisces.Aries.Taurus.Gemini.Cancer.Leo.Virgo.Libra.Scorpio.Sagittarius.Capricorn,$2,46)) {
msg $chan Horoscope usage: !Horoscope <sign>
msg $chan Options: Aquarius Pisces Aries Taurus Gemini Cancer Leo Virgo Libra Scorpio Sagittarius Capricorn
}
}
}
#horoscope off
on *:sockopen:horoscope: {
sockwrite -n $sockname GET $+(/astrology/,%horosign,/daily-overview/) HTTP/1.1
sockwrite -n $sockname Host: shine.yahoo.com
sockwrite -n $sockname Connection: close
sockwrite -n $sockname Authorization: Basic
sockwrite -n $sockname $crlf
}
on *:sockread:horoscope: {
sockread %horotemp
if (<h2 class="extended"> isin %horotemp) { set %horoover $nohtml($v2) }
if (– isin %horotemp) { set %horotime $replace($nohtml($v2),–,-,/,$chr(32)) }
if (<h2> isin %horotemp) { inc %t_t 1 | set %horoquickie $+ %t_t $nohtml($v2) }
if (<p> isin %horotemp) { inc %r_r 1 | set %horooverview $+ %r_r $nohtml($v2) }
}
on *:sockclose:horoscope: {
msg %horochan Sign & Dates: $colored($+($upper($left(%horosign,1)),$right(%horosign,-1)),12) $&
@ $colored($horotime(%horotime),12) Today: $colored($gettok(%horoover,4-6,32),12)
msg %horochan Quickie: $colored(%horoquickie2,3)
msg %horochan Overview: $colored(%horooverview3,3)
unset %horo* %t_t %r_r
.disable #horoscope
}
; Usage: $colored(TEXT,N1,N2) or $colored(TEXT,N1,N2).b
; N1 & N2 are both optional.
alias colored { if ($isid) { return $+($iif($prop = b,$chr(2)),$iif($2 isnum 0-15,$+($chr(3),$iif($len($2) == 1,$+($chr(48),$2),$2))),$iif($3 isnum 0-15,$+($chr(44),$iif($len($3) == 1,$+($chr(48),$3),$3))),$1,$chr(15)) } }
alias -l nohtml {
var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, )
return %x
}
alias horotime {
return $&
$month($gettok(%horotime,1,32)) $ord($gettok(%horotime,2,32)) $&
- $month($gettok(%horotime,4,32)) $ord($gettok(%horotime,5,32))
}
alias month {
return $replace($1,10,October,11,November,12,December,1,January,2,February,$&
3,March,4,April,5,May,6,June,7,July,8,August,9,September)
}
#horoscope end
After your update< it worked fine...now I get his. I tried a fresh copy as well and still the same result...any ideas?
Quickie: yuhead-logo h2{ width:213px; height:48px; background-image:url(http://l.yimg.com/a/i/brand/purplelogo/uh/us/20/lifestyle/shine.png); _background-image:url(http://l.yimg.com/a/i/brand/purplelogo/uh/us/20/lifestyle/shine.gif); } .yuhead-logo a{ width:213px; height:48px; } .yuhead-logo div.yuhead-comarketing { width:213px; } Shine from Yahoo! Search
Scakk, I think you forgot to remove the listened channel #back-lot
There is a great yahoo site called yahoo pipes, which provides graphical user interface for building data that aggregates feeds, webpages, etc..
Check out this link for yahoo astrolgy:
http://pipes.yahoo.com/pipes/pipe.info?_id=_omfgXdL3BGGadhGdrq02Q
You can also get it by clicking RSS or JSON.
The Pipe is made possible by a contributor, which makes finding a particular sign easily.
Update Sep 14th 2011: Redid entire script as site changed, yet again....
[11:20] <Goofy|AFK> !horoscope libra
[11:20] Sign & Dates: 12Libra @ 12 September 23rd - October 22nd Today: 12September 14, 2011
[11:20] Quickie: 03 Appreciate the smaller things in life -- even clouds in the sky deserve your notice.
[11:20] Overview: 03 Your love life can run on autopilot for the time being -- you need to focus all this social energy on other people! Old friends, colleagues, customers, family and more all need your attention now.
I just tested it and it works fine. Perhaps the site was down for some reason.
[15:44] <Goofy|AFK> !horoscope libra
[15:45] Sign & Dates: 07Libra (9/23-10/22) Today: 12Tuesday, January 4, 2011
[15:45] Quickie: 03Stay focused on the important things in life -- if it's not fun, it's not right.
[15:45] Overview: 03Your home life could use some shaking up, and while that's not exactly fun, it is still vital. Make sure that your family or roommates get the heads-up so you don't take them by surprise.
um the snippet seems to be working fine for me
<~napa182> !horoscope Virgo
<&Sick0> Sign & Dates: Virgo (8/23-9/22) Today: Monday, August 16, 2010
<&Sick0> Quickie: You're in a holding pattern right now. Wait until there's an opening and then move.
<&Sick0> Overview: Your curiosity isn't of the cat-killing variety, so go exploring and see what you come up with. It's a safe bet that your life gets a lot more interesting as a result. Inspire friends to do the same.
<~napa182> !horoscope Aquarius
<&Sick0> Sign & Dates: Aquarius (1/20-2/18) Today: Monday, August 16, 2010
<&Sick0> Quickie: Some private information is in danger of being divulged today -- plug up the leaks.
<&Sick0> Overview: Your working life is seeing a boost today, though it may not feel like one at first. In fact, you may be tempted to storm out of the office -- or interview -- but patience pays off in a big way.
Works great, thanks!
[13:47] <+`Dean> .horoscope scorpio
[13:47] <~exHelp> Sign & Dates: Scorpio (10/23-11/21) Today: Saturday, February 6, 2010
[13:47] <~exHelp> Quickie: Be patient and avoid temptation. What seems like a sure bet won't pay off.
[13:47] <~exHelp> Overview: Try not to worry to much about the past -- you need to focus on your vision of the future. It's a really good time for you to step up and enlist the aid of those who are sympathetic to your cause.
The horoscope didn't work for me. but not sure how to copy it. been a long time since I have been on here and it changed. use to u just hi-lighted and copied it but that don't work here. so I copied comments and all then deleted out everything except the script but it didn't work anyway. can someone tell me how the heck you copy scripts here lol?