Top

Lyrics


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  0.0 (of 0 scores)
Date Added  Jun 12, 2009
Last Updated  Jun 12, 2009
Tags  .  lyric  lyrics  mirc  msl  music  name  script  song  www.lyrics.com 

Introduction

Searches and grabs the first search result for lyrics at www.lyrics.com

8:16(08) PM <@TheNitelyfe> @lyrics kanye west
8:16(10) PM <@BluePrint> [ Lyrics ] "kanye west" - Songname: Love Lockdown - Artist: Kanye West - URL: http://www.lyrics.com/artists/lyric/kanye-west-lyrics-love-lockdown


Grab the Code

alias logo return 12[14 $1- 12]
alias htmlfree {
  var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&nbsp;)
  return %x
}
on $*:TEXT:/^[!@.]lyrics/Si:#: {
  set %lyrics.search $2-
  set %lyrics.way $iif($left($1,1) == @,msg #,.notice $nick)
  sockopen lyrics www.lyrics.com 80
}
on *:sockopen:lyrics: {
  sockwrite -nt $sockname GET /search.php?keyword= $+ $replace(%lyrics.search,$chr(32),+) $+ &what=all&x=0&y=0 HTTP/1.1
  sockwrite -nt $sockname Host: www.lyrics.com
  sockwrite -nt $sockname $crlf $crlf
}
on *:SOCKREAD:lyrics: {
  if ($sockerr) halt 
  else {
    var %lyrics.read
    sockread %lyrics.read
    if (*<td><a href="http://www.lyrics.com/artists/name* iswm %lyrics.read) { 
      tokenize 32 %lyrics.read
      set %lyrics.artist $htmlfree($1-)
      %lyrics.way $logo(Lyrics) 14 $+ $qt(12 $+ %lyrics.search $+ 14) - 14Songname:12 %lyrics.songname - 14Artist:12 %lyrics.artist - 14URL:12 %lyrics.url 
      sockclose $sockname
    }
    if (*<td><a href="http://www.lyrics.com/artists/lyric/* iswm %lyrics.read) { 
      tokenize 32 %lyrics.read
      set %lyrics.songname $htmlfree($1-)
    }
    if (*<td><a href="http://www.lyrics.com/artists/lyric/* iswm %lyrics.read) { 
      set %lyrics.url $gettok($2-,2,34) 
    }  
  }
}
 

Comments

  (8)  RSS
napa182
Comments: 1,455
 
mIRC Snippet:  Lyrics
Posted on Jun 12, 2009 10:59 pm
nice work
you can also do it like this as well

Code:
on $*:TEXT:/^([!@.])lyrics\s(.+)/Si:#: {
  if (!$($+(%,lyricsflood,$nick),2)) {
    set -u3 $+(%,lyricsflood,$nick) on
    sockopen lyrics www.lyrics.com 80
    sockmark lyrics $+($replace($regml(2),$chr(32),+),|,$iif($regml(1) == @,msg #,.notice $nick))
  }
}
on *:sockopen:lyrics: {
  sockwrite -nt $sockname GET $+(/search.php?keyword=,$gettok($sock(lyrics).mark,1,124),&what=all&x=0&y=0) HTTP/1.1
  sockwrite -nt $sockname Host: $+(www.lyrics.com,$str($crlf,2))
}
on *:SOCKREAD:lyrics: {
  var %lyrics | sockread %lyrics
  if ($regex(%lyrics,/<td><a href="http:\/\/www.lyrics.com\/artists\/lyric\/(.+)">(.+)<\/a><\/td>/)) { sockmark lyrics $addtok($sock(lyrics).mark,12 $chr(91) 14Lyrics12 $chr(93) 12 $replace($qt($gettok($sock(lyrics).mark,1,124)),+,$chr(32)) - 14Songname:12 $regml(2) $chr(124) - 14URL:12 $+(http://www.lyrics.com/artists/lyric/,$regml(1)),124) }
  if ($regex(%lyrics,/<td><a href="http:\/\/www.lyrics.com\/artists\/name\/.+">(.+)<\/a><\/td>/)) { $gettok($sock(lyrics).mark,2,124) $gettok($sock(lyrics).mark,3,124) - 14Artist:12 $regml(1) $gettok($sock(lyrics).mark,4,124) | sockclose lyrics }
}
just one of many ways to do this script.
WorldDMT
Comments: 171
 
mIRC Snippet:  Lyrics
Posted on Jun 13, 2009 7:38 am
hi

no need for regex

Code:
on $*:TEXT:/^([!@.])lyrics\s(.+)/Si:#:{
  if (!$($+(%,lyricsflood,$nick),2)) {
    set -u3 $+(%,lyricsflood,$nick) 1
    if !$sock(lyrics) {
      sockopen lyrics www.lyrics.com 80
      sockmark lyrics $+(www.lyrics.com,`,$replace($2-,$chr(32),+),`,$2-,`,$iif($regml(1) == @,msg #,.notice $nick))
    }
    else msg # plz wait $nick ...
  }
}
on *:sockopen:lyrics:{
  tokenize 96 $sock(lyrics).mark
  sockwrite -n $sockname GET $+(/search.php?keyword=,$2,&what=all&x=0&y=0) HTTP/1.1
  sockwrite -n $sockname Host: $1
  sockwrite -n $sockname $crlf
}
on *:SOCKREAD:lyrics: {
  var %lyrics | sockread %lyrics
  if $findtok(%lyrics,td>,1,60) {
    if ($wildtok(%lyrics,http://www.lyrics.com/artists/name/*,1,34)) {
      var %artist $remove($gettok(%lyrics,3,62),</a)
      tokenize 96 $sock(lyrics).mark
      $4 12[14 Lyrics 12] 14 $+ $qt(12 $+ $3 $+ 14) - 14Songname:12 %song - 14Artist:12 %artist - 14URL:12 %link
      unset %song %link
      sockclose lyrics
    }
    if ($wildtok(%lyrics,http://www.lyrics.com/artists/lyric/*,1,34)) {
      set %song $remove($gettok(%lyrics,3,62),</a)
      set %link $v1
    }
  }
}
drcheese
Comments: 1
 
mIRC Snippet:  Lyrics
Posted on Jun 13, 2009 9:36 am
How do you activate it in the chatroom?
napa182
Comments: 1,455
 
mIRC Snippet:  Lyrics
Posted on Jun 13, 2009 9:40 am
@WorldDMT as i said in my comment "it's just one of many ways to do this script" his is one way mine is another as well is ur's. So no need to say no need for regex, cuz one can say say no need for $wildtok as well no need for setting global vars. It's just ur opinion nothing more.

@drcheese load it into the remotes of ur bot or you can load it in ur remotes for others to trigger.
_Daniel_
Comments: 42
 
mIRC Snippet:  Lyrics
Posted on Jun 15, 2009 6:09 pm
@napa182 and WorldDMT stop repost the !@#$ ppl codes!
TheNitelyfe
Comments: 46
 
mIRC Snippet:  Lyrics
Posted on Jun 15, 2009 6:33 pm
Actually I don't mind.
napa182
Comments: 1,455
 
mIRC Snippet:  Lyrics
Posted on Jun 15, 2009 7:15 pm
_Daniel_ Said:
Quote:
@napa182 and WorldDMT stop repost the !@#$ ppl codes!


why dont you go get laid and dont worrie about what we do here on this site.
TheNitelyfe
Comments: 46
 
mIRC Snippet:  Lyrics
Posted on Jun 15, 2009 7:36 pm
BURRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRN


Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom