Archived Comments (locked)
|
|
The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008) |
|
|
yes those formats send a request to a computer to convert the file from FLV to your format
NOTE: You should stay on that page until the popup appears
|
|
|
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 >< |
|
|
thanks that's quite helpful
|
|
|
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:
base10: (our standard number system)
base16 (hex)
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)
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
(the equal signs are padded to denote that it's in base-64). |
|
|
thanks that makes everything perfect |
|
|
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 The general syntax is: a_String.getArg(argument_as_string) |
|
|
ok i will check it |
|
|
Joe is right, you can use: /\d+/ or /[0-9]+/ Those are your two best choices; i prefer the first. |
|
|
@avg
@Joe
|
|
|
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. |
|
|
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 solutionvar string='Anthony said, "Good Morning, neighbor!"'; Another solutionvar 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. |
|
|
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):
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. |
|
|
@megamorphg
|
|
|
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. |
|
|
holy shit... this is amazing!
|
|
|
thanks i will considering review that and checking your script
|
|
|
hey dkhal, just a heads up:
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.) |
|
|
lol i didnt know you had one called this
|
|
|
Can you explain me why you rename your script to the same name of my script ? |
|
|
thanks
|
|
|
hi dkhal
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 ;-)
|
|
|
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 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 |
|
|
I arrived at this script following your claims you posted on another thread.
Can this script achieve this feat? If it does, how do I get the URL?
|
|
|
thanks
|