Top

/getvid - download youtube video


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  9.5 (of 2 scores)
Date Added  Oct 26, 2007
Last Updated  Oct 26, 2007
Tags  download  save  video  youtube 

Description

My first time working with socket.........
Its been created when Im feel so tired to open the youtube pages and its source code and then find the video url there's.
So Ive decided to write a simple snippet in mirc to allow me just gave the page url where theres was a video that I want to downloading.

Grab the Code

/*
> File Information
>-------------------
>Name: /getvid
>Author: zonIRC
>Testing with: mIRC 6.21
>Description: A simple snippet that get the url of youtube video based on url specify.
 
>How To Install
>----------------
>1) Open your mIRC editor by hit 'Alt+R'.
>2) Then hit 'Ctrl+L'.
>3) Select this file and click 'Open'.
 
>Syntax
>---------
>/getvid [-b] url
 
>[-b] to make snippet downloading the file by using your default browser.
>     when 'File Download' dialog opened, click 'Save' and choose where to
>     saved it(make sure you named it as .flv file since youtube used that
>     file format).
>url  the address of the file that you like to get.
>     'http://' and 'www.' are not essential.
 
>Example
>--------
>/getvid youtube.com/watch?v=wvMc84FZnI0
>this will opened @getvid and echoing the video URL, so if you want to get the file just
>double click on text after URL:. When you like to see the video on your browser, just
>double click on text after For:
 
>/getvid -b http://youtube.com/watch?v=wvMc84FZnI0
>this will automatically downloading the video file by using your default browser.
 
>Credits
>--------
>1) Sais - for giving me a link for socket code(http://tinyurl.com/3cwfcv)
>2) puzzling - for advice me to send 'User-Agent'
>3) Riamus2 - where its code(http://tinyurl.com/3cwfcv) at that forum have
>             been used by me to learning a way to establish a connection.
*/
 
alias getvid {
  ;/getvid [-b] [url]
  if (!$1) echo -ftsc info * /getvid: insufficient parameter
  else {
    set %openbrowser $iif($1 = -b,1)
    if ($iif(%openbrowser,$2-,$1-)) {
      set %getvid www. $+ $regsubex($v1,/^http://(www.)?/i,)
      if ($sock(getvid)) sockclose getvid
      sockopen getvid $gettok(%getvid,1,47) 80
    }
    else echo -ftsc info * /getvid: url not specified.
  }
}
 
on *:sockopen:getvid:{ 
  if (!$window(@getvid)) window @getvid
  sockwrite -n $sockname GET / $+ $gettok(%getvid,2,47) HTTP/1.1
  sockwrite -n $sockname Host: $gettok(%getvid,1,47)
  sockwrite -n $sockname User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6)
  sockwrite -n $sockname $sockname Accept: */* $+ $crlf $+ $crlf
}
on *:sockread:getvid:{ 
  var %temp
  sockread %temp 
  if ($regsubex(%temp,/var fullscreenUrl = '\/watch_fullscreen/i,) != %temp) {
    var %vidurl = $+($gettok(%getvid,1,47),/get_video,$remove($left($v1,-2),$chr(9)))
    echo @getvid Video URL: %vidurl For: %getvid
    if (%openbrowser) url %vidurl
    sockclose getvid
  }
}
 

Comments

  (10)  RSS
water_dragon
Comments: 50
 
mIRC Snippet:  /getvid - download youtube video
Posted on Feb 1, 2008 11:11 am
it Downloads for me but wot do i use to play the file ? can anyone Tell me that 9/10 (10/10 if you can tell me how to play the file :P)
LucSatise
Comments: 112
 
mIRC Snippet:  /getvid - download youtube video
Posted on Feb 1, 2008 11:17 am
get realplayer ;p
water_dragon
Comments: 50
 
mIRC Snippet:  /getvid - download youtube video
Posted on Feb 1, 2008 12:04 pm
iv got realplayer dont work
water_dragon
Comments: 50
 
mIRC Snippet:  /getvid - download youtube video
Posted on Feb 2, 2008 12:09 am
Still cant find a program/player to play these Files :( any one got any suggestions?
water_dragon
Comments: 50
 
mIRC Snippet:  /getvid - download youtube video
Posted on Feb 2, 2008 12:42 am
never mind figured it out wicked script :) 10/10 i be useing this one alot now :D
mountaindew
Comments: 1,816
 
mIRC Snippet:  /getvid - download youtube video
Posted on Feb 2, 2008 9:57 am
well i'm guessing this downloads the flv files? if so, use total video player (i also reccoment total video converter, so that you can convert to mp4, wmv, mpg, etc.) and i think when you download the converter, the player comes with it.
water_dragon
Comments: 50
 
mIRC Snippet:  /getvid - download youtube video
Posted on Feb 2, 2008 12:50 pm
lol just do (sample) linkin park in the end.avi - save it as an avi file :P thats wot i done
water_dragon
Comments: 50
 
mIRC Snippet:  /getvid - download youtube video
Posted on Feb 5, 2008 3:25 am
(changes 10/10 To 8/10 since hes just found somethink out that he never realised) still a good script tho
zonirc
Comments: 38
 
mIRC Snippet:  /getvid - download youtube video
Posted on Feb 11, 2008 4:18 pm
thanx water_dragon
at least someone feel this one are useful :P
anyway this snippet will downloading a .flv file(which that was a youtube video file format) and that means you need a FLV player which like mountaindew suggesting you can try total video player or you can google for 'flv player' or you can get a codec that supported the .flv player such as storm codec.

water_dragon you can renamed the file as any .xxx that you like, however you still need a FLV player to play it. Even if you rename it as .wmv(for example) and your player didnt support flv format then an error occured.

If you want to convert the downloaded file, once again u can follow what mountaindew said. Or you can try media converter(which im prefer :P), you can get it at http://www.mediaconverter.org/ (either you want used the online converter or download its free version)

For others, there was some major problem for the url this snippet echoing(at @getvid). Since any url that have a spaces are not being converted into url form so a clicking at it will not working(eventhough its work but its redirect the browser to a wrong url).... So its better used the '-b' switches for this moment(until Ive got a desire to recode this thing-got many video to download so cant have spare time to coding lol :P)
biase
Comments: 5
 
mIRC Snippet:  /getvid - download youtube video
Posted on May 14, 2008 2:54 pm
lol... you guys really dunno how to use google to search for codec or other player to play this file. my real player works fine with this file... if u didnt like realplayer i suggest to download k-lite mega codec.

Commenting Options

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

  

Bottom