This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Check when online Streams are up

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
e
evotech
Voice
Posts: 8
Joined: Fri Feb 18, 2011 8:51 am

Check when online Streams are up

Post by evotech »

I have tried gogling for a while and looking around, but what i need is a script that checks when online streams from owned.tv and justin.tv is up

public commands like !streams for instance that could list several streams and number of viewers for instance

Does anyone know of a script like this or has the ability to make one?

I dont quite know where to start
v
vladdeh
Voice
Posts: 33
Joined: Wed Mar 23, 2011 1:52 pm

Post by vladdeh »

I'd also love this
e
evotech
Voice
Posts: 8
Joined: Fri Feb 18, 2011 8:51 am

Post by evotech »

I ended up making a perl script that retrieved info from a php API we made to show some info about a given stream using the different APIs of the different stream providers so my irc script only had to deal with one method of data retrieval.

it's a rather crude operation so id rather not share as it is not scalable, output is defined on a elseif basis

I do hope someone will pick up the idea and make something, i know there are purchasable versions of this on the net but this should really be here somehow :P

Short version:

Code: Select all

 if ( $count le 3 )   { # Finds streams from a series of files
   for ($i = 0; $i <= $#filnvn; $i++)   { #traverses streamfiles
      open(FD, "<$filnvn[$i]") || die ("$0: $!"); #opens files
      while(<FD>)   {                     #while loop
         if ($_ !~ m/-1/)   {               #checks viewer number, if -1 its offline.
            $view=$_;                     #sets viewer number
               if ($urls[$i] =~ m/streamname/)   {   #if it matches this stream, output link to stream
               print "<<Streamname>> www.justin.tv/streamname ($view Viewers) "; $count=1; #found valid stream, exits
            }
         }
      }
   }
}
I did it like this because it was simple and i didn't have to display that many streams, id love to do it again but i dont have time.
v
vladdeh
Voice
Posts: 33
Joined: Wed Mar 23, 2011 1:52 pm

Post by vladdeh »

No one wants to take it upon themselves to do this? :(
v
vladdeh
Voice
Posts: 33
Joined: Wed Mar 23, 2011 1:52 pm

Post by vladdeh »

bump
F
Football
Master
Posts: 205
Joined: Fri Dec 26, 2008 3:08 pm
Location: Quakenet, #Football

Post by Football »

Would love to see it happen
Idling at #Football, Quakenet.
v
vladdeh
Voice
Posts: 33
Joined: Wed Mar 23, 2011 1:52 pm

Post by vladdeh »

Looks like no one capable of coding it is interested or it might be too much work, oh well
v
vladdeh
Voice
Posts: 33
Joined: Wed Mar 23, 2011 1:52 pm

Post by vladdeh »

I'm willing to pay for this :)
Post Reply