mrmr

mrmr

Joined
Oct 12, 2009

Activity Stream

mrmr commented on a Page, Youtube url detector for mIRC  -  Mar 17, 2012

is it possible to make the script just "echo" the title (and settings) to yourself?

 Respond  
mrmr commented on a Page, AKA Nick Tracker  -  May 13, 2010

This is a masterpiece!
So far I'm loving it.

Anyway an option to match USER part for the hostmask would be nice.

 Respond  
mrmr commented on a Page, Lag checker  -  May 02, 2010

in the "menu channel"> .Check every [x] minutes:{
var %c $$?="Enter time in seconds:"

I suggest to change from "minutes" to "seconds in the menu too.

 Respond  
mrmr commented on a Page, YouTube URL "Detector" (v.8)  -  Apr 14, 2010

Just checked this...again
Now, I modded this to "echo" the title to me.
The correct regex for the title is:

$regex(%yt,/<meta name="title" content="([^"]+)">/)
 Respond  
mrmr commented on a Page, YouTube URL "Detector" (v.8)  -  Nov 14, 2009

@Kibblz
you were right...there was a typo in the ratings regex.
(fixed in the previous comment, directly)

smsg $1 [1,0You0,4Tube]: $iif(%x >= 7,$4 $chr(124) $5 $6 $chr(124) $3 $chr(124) Views: $+(,$iif(%x == 9,$9,$8),) $chr(124) Rating: $iif(%x == 9,$+(,$7,) $+($chr(40),$8 $iif($8 == 1,rating,ratings),$chr(41),),$+(,Ratings were disabled,)),Either the video doesn't exist or it contained a malformed video ID.)

this smsg should fix the order

[11:23] http://www.youtube.com/watch?v=31sZ9xZr_Ew
[11:23] [YouTube]: Title: Franz Ferdinand - Ulysses | By: DominoRecords (uploaded on 09 gennaio 2009) | Duration: 3mins 15secs | Views: 2321909 | Rating: Ratings were disabled

Still got some problems with Ratings regex.
Someone know "where" to parse Rating Value? How?
In the page source I cannot get "ratingL" anywhere...

EDIT

[11:33] http://www.youtube.com/watch?v=31sZ9xZr_Ew
[11:33] [YouTube]: Title: Franz Ferdinand - Ulysses | By: DominoRecords (uploaded on 09 gennaio 2009) | Duration: 3mins 15secs | Views: 2321909 | Rating: 5.0 (5832 ratings)

ehm, in the "ratings" regex, we're matching the word "ratings" after the value count:
$regex(%yt,/ratingL-(.+)"\stitle|"smallText">(.+)\sratings<\/span>/g)

Now, I'm from italy....the italian localization for "rating" is "voti".
So I've replaced 'ratings' with 'voti' and now, also ratings are parsed

Note, that even if in your browser you get the non-localized (en-US?) page, the socket from mIRC get your country localization.

 Respond  
mrmr commented on a Page, YouTube URL "Detector" (v.8)  -  Nov 12, 2009
on *:sockread:youtube: {
  var %yt | sockread %yt

  if ($regex(%yt,/<h1 >(.+)<\/h1>/)) sockmark youtube $addmark(youtube,Title: $+(,$regml(1),),62)
  elseif ($regex(%yt,/"length_seconds": "(\d+)/) ) sockmark youtube $addmark(youtube,Duration: $+(,$duration($regml(1)),),62)
  elseif ($regex(%yt,/ratingL-(.+)"\stitle|"smallText">(.+)\sratings<\/span>/g)) sockmark youtube $addmark(youtube,$+($regml(1),>,$regml(2)),62)
  elseif ($regex(%yt,/"watch-view-count">(.+)<\/span>\svi/)) sockmark youtube $addmark(youtube,$regml(1),62)
  elseif ($regex(%yt,date">(.+)<\/span>)) sockmark youtube $addmark(youtube,$+($chr(40),uploaded on $regml(1),$chr(41)),62)
  elseif ($regex(%yt,<a\sclass="url"\shref="\/user\/(\w+)")) sockmark youtube $addmark(youtube,By: $+(,$regml(1),),62)
}

This should work at the time of NOW.
Be aware that in some country, due to youtube's localization, something could not work as intended ;) (learn it the hard way...eehhe)

ohhh, wanna add this too:

on *:INPUT:#: {
  if ($regex($1,http\:\/\/.*youtube.*\/watch\?v=(.{11})&?.*)) {
    if (!$sock(youtube)) {
      noop $regex($strip($1-),http:\/\/.*youtube.*\/watch\?v=(.{11})&?.*)
      sockopen youtube www.youtube.com 80 | sockmark youtube $+(#,>,$regml(1))
    }
  }
}

this should "catch" also input from you, parsing youtube links that you paste in any channel.

Note that I'm a scripting beginner...so don't mind my "bad" style

EDIT: typo in ratings regex

 Respond  
mrmr commented on a Page, IP Address Locator  -  Oct 13, 2009

heh...forgot to say that ip-adress.com, due to bots has a limit on queries per day.
registering a free account permit for 50 queries per day...so what about adding a "log-in" feature? eheh...ok...guess this' too much...

Yesterday I looked to your script to mod it for ip-adress, but I definitely suck at regex ;)

 Respond  
mrmr commented on a Page, IP Address Locator  -  Oct 12, 2009

very nice snippet indeed.
Here's some other locators tools.
would be nice to have them all in one script only (selectable).
Here in Europe, seems the first two work better.

http://www.ip-adress.com/ip_tracer/1.2.3.4
http://www.ip2location.com/1.2.3.4
http://www.melissadata.com/lookups/iplocation.asp?ipaddress=1.2.3.4
http://www.dnsstuff.com/tools/ipall/?tool_id=67&ip=1.2.3.4

 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.