YouTube and Google Snippet [For Your Bot]

By Back2Life on Dec 27, 2010

Load this into your bot and people can PM it with simply ~ytube or ~ggle and search anything they like. Note that spaces should be replaced with plus signs, +.

I know it is simple and may not be necessary but if people want a quick search then they use this.

on *:TEXT:~ytube*:?: { msg $nick The videos you searched for can be found here: http://www.youtube.com/results?search_query= $+ $replace($2-,$chr(32),+) $+ &aq=f }
on *:TEXT:~ggle*:?: { msg $nick The query you searched for can be found here: http://www.google.com/search?hl=en&source=hp&biw=1024&bih=475&q= $+ $replace($2-,$chr(32),+) $+ +&aq=f&aqi=g-s10&aql=&oq=&gs_rfai= }

Comments

Sign in to comment.
Back2Life   -  Dec 27, 2010

Hello Jethro_, thank you for posting that advice! I'll be sure to use it in my script!

 Respond  
Jethro   -  Dec 27, 2010

msg $nick Note: If you used multiple words you may want to try again using +'s as spaces.you can use $replace() to substitute space for the plus sign:

$replace($2-,$chr(32),+)
 Respond  
Jethro   -  Dec 27, 2010
on $*:TEXT:/^~(ytube|ggle)\b/iS:*:{
  if ($regml(1) == ytube) {
    msg $nick The videos you searched for can be found here: $&
      $+(http://www.youtube.com/results?search_query=,$replace($strip($$2-),$chr(32),+),&aq=f)
  }
  else {
    msg $nick The query you searched for can be found here: $&
      $+(http://www.google.com/search?hl=en&source=hp&biw=1024&bih=475&q=,$&
      $replace($strip($$2-),$chr(32),+),+&aq=f&aqi=g-s10&aql=&oq=&gs_rfai=)
  }
}
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.