Welcome guest, is this your first visit? Create Account now to join.
Page 1 of 4 123 ... LastLast
Results 1 to 10 of 38

This is a discussion on Extensible Video downloader within the Chrome Plugins section, part of the Google Chrome category: I started this project before the YouTube one was released, I'm totally not trying to reinvent the wheel here. >< ...


  1. #1
    Waha's Avatar
    Waha is offline Senior Member
    Join Date
    Apr 2009
    Location
    Oregon
    Posts
    788

    Default Extensible Video downloader

    I started this project before the YouTube one was released, I'm totally not trying to reinvent the wheel here. >< However I continued the project because I designed it to be extensible to download from almost any website without having to make an entirely new extension.
    Currently the only video sites I could figure out and implemented are YouTube.com and Break.com, if you know how to get the .flv from other sites, feel free to post how! (Or write the descriptor yourself and post that.)

    The descriptor isn't very simple..sorry, I tried to make it as simple as I could. The basic idea is to take a value from the page, url, javascript, a different downloaded page, etc, and use regex to truncate it (if necessary) and plop it into the final URL for the flv. ie. newurl = data.replace(regex,url);
    There's a lot of options for getting the data, which are all explained in the grabber.js file for those of you daring enough to make your own.
    I will explain YouTube's descriptor here to help out though:
    Code:
    video["*.youtube.com/watch"] = new Array(
    new Array("js:swfArgs['video_id']","js:swfArgs['t']"),
    new Array(/(.*)/,/(.*)/),"http://youtube.com/get_video?video_id=$1&t=$2",
    "silver","id:watch-vid-title");
    Firstly video is the array of descriptors.

    *.youtube.com/watch is the url pattern to run this descriptor against the page (mini greasemonkey! O: ). It's excruciatingly limited and complexly built because it's an index. There is a thorough description in the .js file. But basically, the *. says it's active for all sub domains, the youtube.com says it's active on youtube.com (duh) the / says there's a specific directory this can only be run in, and watch is that directory.

    The first array set are the objects, what isolates the data. You can have as many of these as necessary so long as you have a regex expression for each one (that's the second array set).

    js:swfArgs['video_id'] js: denotes that we're looking at a javascrpt variable defined on the page for this data, swfArgs['video_id'] is the variable to look at. This returns the value of swfArgs['video_id']. I think you can figure out the second one.

    Its matching regex is /(.*)/, which means "remember all" in regex, meaning we're going to be using the whole value in the url string.

    http://youtube.com/get_video?video_id=$1&t=$2 is the url string, $1 and $2 are where the values retrieved from the data goes. $1 is the first one (js:swfArgs['video_id']) and $2 is the second (js:swfArgs['t']).

    The last two are the graphical part of it, silver is the name of the button used, you can define more buttons in the buttons array, which is explained in the .js, and I won't do it here.

    id:video_wrap is where it will place the button on the page, id: means video_wrap is the id of the DOM object we're appending the button child to. (Appending - which means it will be going to the end of that object, so if the swf flv player is in that same object, it will go below or to the right of the swf
    flv player.)

    If you have any questions, please ask. I'll be happy to help.

    Download it here:
    http://logicplace.com/pc/projects/ch...%20grabber.crx

    UPDATE 1.1:
    * Added support for: blip.tv, clipshack.com, and four AO sites.
    * Improved page download and custom function support
    * Bug fix: Unable to renumber a $X number in a URL if it was at position 0 in the string.
    * Bug fix: Added support for default object notation (name). Should have been added in first release..
    * Bug fix: RegEx is unable to easily remove unmatched data on multiple lines. All newlines replaced in all returns.
    * Bug fix: "body:" now returns the contents instead of the object.
    * Post 1.1: Updated crx to be compatible with 3.0.189.0
    * Post 1.1 Bug fix: Fixed button images not loading.
    Last edited by Waha; 06-20-2009 at 12:02 AM.

  2. #2
    Kyrax is offline Senior Member
    Join Date
    Apr 2009
    Location
    Qc, Canada
    Posts
    495

    Default

    Very well done. I appreciate the loosely coupled design.

    Good job, thanks for sharing this with us !

  3. #3
    Waha's Avatar
    Waha is offline Senior Member
    Join Date
    Apr 2009
    Location
    Oregon
    Posts
    788

    Default

    Thanks. :]
    I've updated the extension.
    I have a couple more tubes I wrote descriptors for but they're 18+ sites, so I was wondering, would it be okay if I included them in the source? Or would that be tant amount to potentially corrupting a minor, since someone can open the source and see the URLs? Disclaimer perhaps?
    I excluded them from the current version just in case.

    I'd like to include them because they're the only ones to example "func:", plus it's more functionality. But it's not really important.
    Last edited by Waha; 06-14-2009 at 10:49 AM.

  4. #4
    devilslackey is offline Moderator
    Join Date
    May 2009
    Location
    Orange County
    Posts
    330

    Default

    I would say it's ok. It's not like your posting a clickable URL for people. You make your extension any way you want to.

  5. #5
    Waha's Avatar
    Waha is offline Senior Member
    Join Date
    Apr 2009
    Location
    Oregon
    Posts
    788

    Default

    Alright.
    I forgot to take out a couple debug alerts, so I reuploaded it, heh. Also readded the 18+ stuff.

  6. #6
    Waha's Avatar
    Waha is offline Senior Member
    Join Date
    Apr 2009
    Location
    Oregon
    Posts
    788

    Default

    I had already updated this for 3.0.189.0, but I just noticed the images were broken, so I fixed that and reuploaded. (There was no version upgrade, so if you already had the 3.0.189.0 version installed, uninstall "Video Grabber" from chrome://extensions/ before reinstalling.)
    ~ Projects ~
    Specialized: Carapass Auction Watcher, Kongregate Chat
    Libraries: bliplib
    Tools: manifest syntax highlighting & snippits
    ~ Happy to make extensions for pay too ;D ~
    Portfolio: Search and Share

  7. #7
    seyss is offline Junior Member
    Join Date
    Aug 2009
    Posts
    14

    Default

    This extension won't work on Google Chrome 3.0.196.2 !!

    Icon won't show up!

  8. #8
    seyss is offline Junior Member
    Join Date
    Aug 2009
    Posts
    14

    Default

    Btw it won't even install

  9. #9
    Waha's Avatar
    Waha is offline Senior Member
    Join Date
    Apr 2009
    Location
    Oregon
    Posts
    788

    Default

    Nope, it's broken right now and it will stay broken until I figure out a whole new way of retrieving JavaScript variables from the content window.
    I also think I figured out a more reliable XHR method I'll give a try.
    ~ Projects ~
    Specialized: Carapass Auction Watcher, Kongregate Chat
    Libraries: bliplib
    Tools: manifest syntax highlighting & snippits
    ~ Happy to make extensions for pay too ;D ~
    Portfolio: Search and Share

  10. #10
    seyss is offline Junior Member
    Join Date
    Aug 2009
    Posts
    14

    Default

    Hey man I know you make this off your free time and stuff but can you please hurry because we need your addon like right now Thanks

    Oh another thing can you also make it recognize HD videos in youtube? If I'm watching a HD video download the HD video..

Page 1 of 4 123 ... LastLast

Similar Threads

  1. Youtube video on MSN Messenger
    By superp in forum Chrome Tips & Tricks
    Replies: 2
    Last Post: 05-05-2011, 07:56 AM
  2. HTML 5 <video> tags or the end of Flash
    By Luc VN in forum Chrome Tech
    Replies: 4
    Last Post: 03-23-2010, 06:32 AM
  3. problems playing video in browser
    By harbingerofdoom in forum Chrome Plugins
    Replies: 3
    Last Post: 05-21-2009, 05:11 PM
  4. usatoday.com video problem
    By LarryI in forum Bugs and Vulnerabilities
    Replies: 0
    Last Post: 11-28-2008, 02:08 AM
  5. video slow when still loading
    By sam2 in forum Bugs and Vulnerabilities
    Replies: 0
    Last Post: 11-18-2008, 05:00 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •