Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Download Google Videos as AVI


  • Please log in to reply
3 replies to this topic
mbirth
  • Members
  • 40 posts
  • Last active: Jul 31 2008 11:12 AM
  • Joined: 03 Oct 2005
Since Google Videos are ordinary AVI movies, I wrote this little script to extract the URL from a text/google-video-pointer (.gvp) file and download the file directly. Just add this new mime-type and extension to your browser and set it to open with this script.

IfNotExist %1%
{
  MsgBox File not found. Please specify the path to a .gvp file of type text/google-video-pointer.
  ExitApp 255
}

Loop Read, %1%
{
  srch := " "
  repl := "_"
  SplitFirst(tagn, value, A_LoopReadLine, ":")
  StringReplace tagn, tagn, %srch%, %repl%, 1
  oldt := %tagn%
  If (StrLen(oldt)>0) {
    %tagn% = %oldt%`n%value%
  }
  Else {
    %tagn% = %value%
  }
}
MsgBox 4132, Download Google Video, You are about to download the following video file from Google Video:`n`n%title%`n`n%description%`n`nDo you want to continue?

IfMsgBox Yes
{
  Run %url%
  ExitApp
}
Else {
  ExitApp 1
}

SplitFirst(ByRef OutLeft, ByRef OutRight, InpText, InpSep) {
  StringGetPos SepPos, InpText, %InpSep%, L
  If (SepPos >= 0) {
    StringLeft OutLeft, InpText, %SepPos%
    RemChars := StrLen(InpText)-SepPos-1
    StringRight OutRight, InpText, %RemChars%
  }
  Else {
    OutLeft  := InpText
    OutRight := ""
  }
}


Cheers,
-mARKUS

P.S.: I know you could change it to accept an URL to the .gvp-file, but this way you would have to handle 404-pages, etc. by the script.

P.P.S.: Maybe I should add deletion of the .gvp-file after initiating the download?

  • Guests
  • Last active:
  • Joined: --
http://keepvid.com/

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Nice script and link in the two posts above. They avoid the need to download special software just to play Google videos, which was a little annoying.

Snakeforhire
  • Guests
  • Last active:
  • Joined: --
Hmmm.. Nice, however it's lacking a howto about how to add it to the MIME types of IE or FIrefox..

Any input about how this is done, without me having to browse Google for hours ?