Youtube Enhancer

By dkhal Last update Sep 21, 2008 — Installed 16,551 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 42 posts, 12 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
dkhal Script's Author

yes those formats send a request to a computer to convert the file from FLV to your format
you should get the pop up in less than twice the time of the video
example if you want to download a 3 minutes video in AVI you should get a pop up in less than 6 minutes (this is for the slowest connection possible)

NOTE: You should stay on that page until the popup appears
if you click on any link or exit youtube the request will be canceled and you won't get your pop up

 
cormilk User

It is good but when i try to download in avi, mpeg and wmv format i dont get the pop up to save file. These are the formats i need ><

 
dkhal Script's Author

thanks that's quite helpful
i think now i know all the things i need to code scripts and if i had anymore problems later i will consult you for help :)

 
Avindra V.G. Scriptwright

You're not being pushy, and I love helping people, so just feel free. It's called "base-64" encoding of data, and css allows you to stick in straight-up base64 data into some css properties. Base64 means literally it's in base64.

First, a little background:

For example, base2 (which is binary), can be counted in zero's and one's:
0 1

base10: (our standard number system)
1 2 3 4 5 6 7 8 9 10

base16 (hex)
1 2 3 4 5 6 7 8 9 10 A B C D E F

then...

base64, whose "digits" use all the letters, upper and lower, all the digits, and two other symbols (usually between "+ / =", but it varies due to language conflicts, etc)
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 + /

there's a lot of converters, here's one that allows you to upload a file and get it's base64 equivalent.

Just an interesting tidbit.... the reason we count in base10 is probably because we have 10 fingers, and people counted with their fingers alll the way back then. Imagine if we had like 16, and we counted in some strange other form....!

Example conversions: (using the number 2008)

Binary (base-2): 11111011000
Hex (base-16): 7D8
Base-10 (regular) : 2008
Base-64: MjAwOA==

(the equal signs are padded to denote that it's in base-64).

 
dkhal Script's Author

thanks that makes everything perfect

 
Avindra V.G. Scriptwright

hey dkhal, I made an argument parsing function which i've tested and it works perfectly:

String.prototype.getArg=function(arg) {
var re=new RegExp(arg+"=([^&]+)");
return re.exec(this)[1];
}

Now, assuming this block of code is included, finding the argument you want is as easy as:

location.href.getArg("arg1")

Notice also that it is a function of String.prototype, which means you can use the new getArg function on ANY string, like document.URL, or document.body.innerHTML.match(/game=.+/)[0], or "some type of string", or somenode.textContent.

The general syntax is:

a_String.getArg(argument_as_string)

 
dkhal Script's Author

ok i will check it

 
Avindra V.G. Scriptwright

Joe is right, you can use:

/\d+/

or

/[0-9]+/

Those are your two best choices; i prefer the first.

 
dkhal Script's Author

@avg
thanks i will practice a bit on that and see what i can do i will ask you some questions if i encounter any difficulties

@Joe
yes i did COPY not STEAL some parts of a script of yours and i did mention that in a comment line next to it but some guy told me to remove all comments making the script much more readable so i did
i will put the @copyright in the beginning of the script right after i rewrite it in regexp

 
JoeSimmons Scriptwright

Use this guide if you want to learn regular expressions. I did. I'm ok at them now. Just read everything, make a test script as you learn and try reg expressions on your own strings in the script.

Also I see you stole some things from my script. Please rename this script and ask me next time to use my code.

 
Avindra V.G. Scriptwright

Oh and if you didn't know what I meant by "escaping", it's basically when you have a character you want, but you can't use it because it signifies something else, you can escape it (typically with a backslash [ \ ] ).

Example:

Improper:

var string="Anthony said, "Good Morning, neighbor!"";

Typical solution

var string='Anthony said, "Good Morning, neighbor!"';

Another solution

var q='"';
var string="Anthony said, " + q + "Good morning, neighbor!" + q;

Escaping solution (preferred/best)

var string="Anthony said, \"Good morning, neighbor!\"";

And in regex (forward-slash form), you have to escape all of these: [ \ ^ $ . | ? * + ( ) { } /

Forward slash needs to be escaped because forward-slash denotes the end/beginning of a regex statement.

 
Avindra V.G. Scriptwright
I use this reference guide. try reading through it, and see if you can make some sense of it. I hate reading the articles on the site, because the reference supplies concise and accurate information about RegEx that shouldn't be too hard for someone familiar with JavaScript. A few things about Regex (in JavaScript specifically):
  1. you can create a regex pattern from a string by doing
    var regex= new RegExp("example.+")
  2. the other way is just to do two forward slashes and your regex statement in the middle. ex: /example.+/
  3. All regex objects have two native functions: .exec() and .test(). If you do like /example.+/.test("somestring"), it will return true if it was found at least once. /example.+/.exec("somestring") would return an array containing all matches
  4. The main usage is for matching and replacing in strings. Examples:
    1. somestring.replace(/regexhere/,"replacement")
    2. somestring.match(/regexhere/)
  5. You may want to include the "g" modifier if you want to include line breaks and have more than one match. Example: instead of /\r\n/ to match one linebreak, you can match all with /\r\n/g.
An example for this script would be instead of:
url.indexOf("metrolyrics")>"-1"
you can do:
/metrolyrics/.test(url)
which reads better than indexOf > -1 anyway :D I recoded this block here for an example: using substrings:
	if (url.indexOf("lyricwiki")>"-1") {
		cut=tmp.substr(tmp.indexOf("<div class='lyricbox' >")+23);
		cut=cut.substr(0,cut.indexOf('</div>'));
	}
using regex:
	if(/lyricwiki/.test(url)) cut=tmp.match(/<div class="lyricbox"(.|\n)+?<\/div>/)[0]
Explanation: If lyricwiki, then get the lyrics. Search for lyricbox div. The ( . | \n ) part is a character group (parentheses), (dot) matches any character except line-breaks, the "|" means check for either one. The plus (+) means to repeat the previous character or character group as many times as possible before encountering the next character or character group. The "\n" is an escaped new-line, so it will check for line-breaks and any character. The question mark is to make sure it stops at the FIRST "div" element encountered, not the last one. I had to escape the part with a backslash to <\/div>, because forward-slashes indicate the end of a regex pattern in javascript.
 
dkhal Script's Author

@megamorphg
thanks i will work on it to make it cooler when i have some free time
@avg
thats a wonderful thought
but no i dont know reg expressions
i heard about it and would love it if you can code some parts and teach me what each word means in comments next to the line

 
Avindra V.G. Scriptwright

hey 1 more suggestion.... you should use regexp instead of all those substrings and indexOf's and replaces. do you know regex? If you don't i'll be more than happy to recode some parts of it with regex.

 
megamorphg User

holy shit... this is amazing!
nice work!
you need some work on the interface though and making it smaller + less ugly--
functionally though, this is fantastic! :)

 
dkhal Script's Author

thanks i will considering review that and checking your script
@all:
lyrics added plz inform me of anything unusual in case you see something

 
Avindra V.G. Scriptwright

hey dkhal, just a heads up:
p.setAttribute('flashvars', fv.replace(fmt_map, '18/512000/9/0/115').replace(vq, '2'));

doesn't work on all videos. (like this one wouldn't work or this one.)

check out and feel free to use my technique on this script. (scroll down to the "The Source" section, because it's kind of hard to read the actual source.)

 
dkhal Script's Author

lol i didnt know you had one called this
i renamed mine because it was a youtube video downloader and now became a youtube enhancer no personal reasons i swear
and i'm sorry if i did hurt u in some way

 
GIJoe Scriptwright

Can you explain me why you rename your script to the same name of my script ?

 
dkhal Script's Author

thanks
i will upload it and the favorites should work now i forgot to edit a line for deleting execution when i transferred to the safer domain but now it's fixed and will be on when i upload it along with Lyrics functionality and trust me the lyrics will make this script the coolest thing ever
and dnt worry about ur english its not that bad :)

 
Test123 User

hi dkhal
thx for the german translation, but it's sometimes wrong...
so I edited the languages.js for myself, here is the languages.js file: http://mid.kilu.de/anderes/languages.js

and I think the favorites list doesn't work, I can add videos, but I can't delete them ^^ (if I press the X nothing happens and after reloading the number of favorites is the same)

Hope You can fix this ;-)
PS: and optional you can put the favorites link everytime on the topmenu, now it's just on the videosite (sry for bad english ^^)

 
dkhal Script's Author

in this update the script cannot reach this video but it will when i'll send the next update (containing a list of exceptions)
the video you want can be downloaded via this link:
FLV: http://keepvid.com/save-video.flv?http%3A%2F%2F...
MP4: http://keepvid.com/save-video.mp4?http%3A%2F%2F...

the old FLV direct link that movie player uses for reading (the one you are asking about) is now protected and not accessible but for admins of YT so nothing can access it anymore

 
The Shopkeeper User

I arrived at this script following your claims you posted on another thread.
I'm looking for a script that displays the full, real path of the FLV on youtube.
I'm not sure if YT uses the same method now, but you used to be able to get a url for the FLV.
For example:
http://www.youtube.com/watch?v=b10P4vtLdFI
plays this flv.
http://ash-v74.ash.youtube.com/get_video?video_...

Can this script achieve this feat? If it does, how do I get the URL?
Fab script by the way.

 
dkhal Script's Author

thanks
German language added but requests for it by the script will not be accepted until the next update
when you see that i made an update ( i will change the screen shots...) download the script and here you go
btw if some translations are incorrect please do tell me and correct them if you can
i assure you that french and english are correct but for others, i dont have a clue lol my friends help me with that

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel