Extensions :  K-Meleon Web Browser Forum
All about K-Meleon extensions. 
Pages: Previous12345Next
Current Page: 4 of 5
Re: Download YouTube Videos as MP4
Posted by: siria
Date: November 14, 2020 01:12AM

Quote
JohnHell
There are, there must be. Fiddling with parameters does nothing.
That is the reason I removed the "injection" in the final URL of the "ratebypass=yes" parameter that was supposed to work by making DASH formats to download at full speed, but that long ago stopped working. By the time of the script, indeed, around 2016-2018.

Never heard of that, no clue. Any harm if my own script uses just the original src-links unmodified?

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: JohnHell
Date: November 14, 2020 01:31AM

No, the server will ignore what they want, as they do with ratebypass. But wait, what original URLs ?

But retrieve the URLs from the source code JSON as we have talked in this thread. There is not need to keep not working parameters.

By the way, now, to identify copyright protected or undownloadable videos is not cipher property for each quality, but signatureCipher.



Edited 1 time(s). Last edit at 11/14/2020 01:33AM by JohnHell.

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: siria
Date: November 14, 2020 02:27AM

Hmm, confused now, nothing complicated: with original URLs
I merely mean the url-string in the json as is:
{\"itag\":18,\"url\":\"https:\/..."

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: JohnHell
Date: November 14, 2020 03:03AM

Quote
siria
Hmm, confused now, nothing complicated: with original URLs
I merely mean the url-string in the json as is:
{\"itag\":18,\"url\":\"https:\/..."

I was thinking you meant something from the original script carried to your script.

So

Quote
siria
Any harm if my own script uses just the original src-links unmodified?

No harm as it is what they expect.


I talked about parameters like ratebypass (to allow full speed for DASH formats) because you talked about them like "&requiressl". And YouTube is ignoring any parameter that isn't expected, so any added parameter is as it wouldn't exists. Like ratebypass that being in the url, or not, is absolutely unnecessary and useless.

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: JohnHell
Date: November 20, 2020 05:29PM

I know, I know, as of today, 2020-11-20, it doesn't work, but... I don't dare to make a fix.

No.

No, because they f**** up all the code again. It isn't that it can't be fixed, it can, easily, maybe even easier, but when you look at their source code and they placed ALL elements THAT MUST BE on HEAD placed in the body........ I'm not going to take this or that action because soon or later they might find their error and they fix it and, so, change all the code again.

Or maybe not, because as the living standard (aka HTML5 the way I want (signed by Google, Apple, Mozilla, other vendors)) doesn't forbid HEAD elements to be in the BODY......... I'll never understand this living standard madness.

So, I prefer to wait, at least to Monday.

You know, if you need to download videos to view them locally, use those pages that help to do it, if there are some out there left..., thanks to RIAA and MPAA campaign against them.



Edited 1 time(s). Last edit at 11/20/2020 05:30PM by JohnHell.

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: siria
Date: November 20, 2020 05:58PM

Just the last days someone posted a tip for a new helper page which finally allowed me to watch a video my old browser couldn't play!
How: replace youtube with youtubemy in url.

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: Kris_88
Date: November 20, 2020 10:33PM

Or genyoutube instead of youtube.

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: JohnHell
Date: November 21, 2020 01:44AM

Thanks both for the sites suggestions smiling smiley

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: JohnHell
Date: November 25, 2020 12:11AM

All-in.

I used eval for parsing.

This is the first time I warn about it, but as I use eval for JS disabled and in the future may cause errors:

This download is offered as is. Use at your own risk.

I won't change for other parsing methods, sorry. And I know this will come back to me like a boomerang, but I'm not going to waste much time. After all they will make any change that will force to change everything then...



Edited 1 time(s). Last edit at 11/25/2020 12:11AM by JohnHell.

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: JohnHell
Date: November 25, 2020 04:01PM

I told you, and is why I waited to Tuesday. And even I wanted to wait to Wednesday. What do they just did?

They have changed the code. I knew. Hey, but meta tags are still in body now on head, but DIVs on head. Good job, YouTube XD.

🙄🤣


If this continues I'll stop maintaining this code. My time is more necessary in other things than this.

Maybe I wait a week or two and maybe I post a new code, or maybe not.



Edited 1 time(s). Last edit at 11/25/2020 04:04PM by JohnHell.

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: JohnHell
Date: November 26, 2020 08:03PM

Finally the new code is the old code.

What is funny is how the "new" previous code was... loading the code, then reassigning to a secondary variable and all to left as it was earlier :-?

And now? Did you see that, if you view a page with JS enabled they load a polymer txt/js file of 6MB that, in theory, helps old browsers to render the site (it depends of what they consider old), and with all files total 6.3MB (compressed) of downloaded data for a total of ~10MB of uncompressed data?

How I'd wish to have plenty of CPU and RAM, as all out there looks they have, to don't care about optimizations.


Updated, regression, or whatever file. As it is the old code, no more eval.

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: siria
Date: December 01, 2020 11:39PM

Forever changing... Occasionally youtube needs now UA googlebot again.
Otherwise my own script doesn't find the URLs anymore and only part of the rest.

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: JohnHell
Date: December 08, 2020 03:05AM

Quote
siria
Forever changing... Occasionally youtube needs now UA googlebot again.
Otherwise my own script doesn't find the URLs anymore and only part of the rest.

Every couple days, or so.

I'll post a babysitting new one with this code changing madness fix if SourceForge starts responding with... normality...

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: JohnHell
Date: December 08, 2020 04:07PM

Updated file.

Overwrite all files this time, the .kmm macro file and the .js file inside the folder. Remember to drop it to the K-meleon Root Macro folder.

Despite you might already have it running, after update it, the first time it runs, it will ask for enabling it or not. If you don't enable it, it won't work. You can enable it later, or disable.

This has made to deal better with new script features.

And as YouTube doesn't stop changing the code continuously, the script has been updated to check for the availability of the code twice. Enough if they don't decide to add a third or fourth method of building their own website, as they have reached a level of pure madness.

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: win2kfan
Date: February 20, 2021 09:40PM

I can't see the "download arrow" anymore using the latest version of the macro. (K-Meleon 74 on Goanna 2.2)

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: JohnHell
Date: February 21, 2021 04:38PM

Could you you send me at this address (alternatively you can post it here, but is up to you) a screen shot, of the whole page, preferable, even though one covering the player and description would be enough, with Kriss_88 add-on (if compatible with that version), or jsut a "Print Screen" button one AND the resulting layout ("File > save page as...") as YouTube serves it to you (in the save dialog is enough to choose "HTML only" option)?


Since a few weeks the site is working on older versions (at cost of a lot of CPU time) with JavaScript enabled (the script should continue working with JavaScript support disabled) and I suspect YouTube serves different page per device/visitor/user agent, etc., and so I need a copy of what is being served to you, to address where to place the menu.

Do it with a random video and if you have an account, preferable logged out, for your own privacy purposes.



Edited 3 time(s). Last edit at 02/21/2021 05:32PM by JohnHell.

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: win2kfan
Date: February 21, 2021 08:40PM

I can't find the "File -> save page as" option in KM74-g22 :O

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: JohnHell
Date: February 21, 2021 09:22PM

Quote
win2kfan
I can't find the "File -> save page as" option in KM74-g22 :O

:-?

CTRL + S ?

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: siria
Date: February 22, 2021 05:57AM

Quote
win2kfan
I can't find the "File -> save page as" option in KM74-g22 :O

?? Menu bar hidden? F2 > GUI > Toolbars (bottom)

But it should also be on the CompactMenu button, right in the middle

Or did you look for it inside the page...? smiling smiley

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: win2kfan
Date: February 25, 2021 04:48PM

Yes, the menu bar was hidden.

JohnHell, you've got mail - sorry for the delay.

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: JohnHell
Date: February 26, 2021 03:44PM

One more question.

Is the button always unavailable or is it when you click a link to another video from the right (or elsewhere inside YouTube site)?

Note, and I was going to save this before post an update, that following a link from inside YouTube won't make the button reappear for each new video. First, because the page isn't really reloaded, only the content is dynamically changed, so the macro won't fire (and I'm not going to complicate it further (too much entropy)); and second because I haven't been able to catch where they store the new video data and any try to discover I ended with an out of memory from the JavaScript engine.

With time, maybe it is possible to catch it, but isn't something I have to spare. There is a quite tricky function that does the job of updating the video data, but is quite beyond my skills.

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: win2kfan
Date: February 26, 2021 07:00PM

I opened the YouTube-link directly (copy & paste into address bar) but there's no download arrow. :s

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: JohnHell
Date: February 27, 2021 05:16PM

Download it from the first page, as always.


It might work, and it is all I could say. I don't have enough CPU, nor RAM to test it.

If with JavaScript enabled isn't being shown, just disable JavaScript and reload. Then, it will work 99.99% of times.

Sorry, but my specs are what they are and I can't test the JS dynamically created layout of YouTube as it could be done. Just can't. It is a killer for old PCs this new layout.

Also, consider this update as some kind of beta. I had pending some minor changes to add qualities descriptions and other stuff but may have some trash code too, as debug alerts or similar code, even probably some swearings in the form of comments. I tried to clean all, but maybe I left something.



Edited 1 time(s). Last edit at 02/27/2021 05:29PM by JohnHell.

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: win2kfan
Date: March 04, 2021 05:05PM

I tried it with blocked JavaScript, but there's still no download arrow sad smiley

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: JohnHell
Date: March 04, 2021 10:54PM

Ok, re-download, but before you do, could you check something?

Tell me if Tools menu > Youtube video download helper is enabled. If it has the tick mark, the checked mark, whatever.

It isn't needed to tell..., but, if it isn't enabled, enable it, as overwrite with the new version will do nothing.

There was a funny bug in the .kmm file, the macro itself on comparison. Due to the overwhelming audience of this macro, no one reported it XD

I added a new bug report, just in case... (not about the above, but the script)

And... well, no one here uses 1.x anymore... but there wasn't backward compatibility with 1.x in the javascript statements by javascript engine back that version, so now there is.

I don't think it matters to fix this. But, anyway..., to honor what the .kmm file tells in the description that it should be compatible with 1.x.



Edited 4 time(s). Last edit at 03/04/2021 10:58PM by JohnHell.

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: win2kfan
Date: March 05, 2021 10:24PM

Success! The download arrow is back!

Great work, JohnHell smiling smiley

Have a nice weekend :cool:

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: JohnHell
Date: March 05, 2021 11:19PM

And what about this? I have curiosity about it.


Quote
johnhell
Ok, re-download, but before you do, could you check something?

Tell me if Tools menu > Youtube video download helper is enabled. If it has the tick mark, the checked mark, whatever.


Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: win2kfan
Date: March 06, 2021 04:07PM

No, it wasn't enabled and I had to enable it manually after the update.

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: JohnHell
Date: March 06, 2021 06:14PM

Thanks.

I, actually, didn't change anything regarding its functionality on the script (.js), so the problem was the .kmm file. The macro.

That tells me that maybe you is the only one using this macro grinning smiley because it is strange no one reported it XD

What it is strange is that it worked on you earlier, at least since I added the user interaction for enabling/disabling/check-first-run.

Dumb bugs are the best

Options: ReplyQuote
Re: Download YouTube Videos as MP4
Posted by: JohnHell
Date: October 13, 2021 03:22PM

Just an update to tell that you may be noticing that the downloads are slow (50-90KB/s, I feel as I travelled in time back 20 years) that started a few weeks back and that is an issue, well, of the script, but because YouTube is throttling aggressively for whatever reason.

If the video plays on a... compatible browser (with its JavaScript player and all fanfare), the video downloads to the cache fast, so might be some data sent to the server or extra parameter. Either case, as it may need a new link signature, and I don't have a clue about it (generate one), this extension will continue being as is. Even youtube-dl and other tools have problems, so I couldn't find what is going on despite the hard I try to dig about it.

Just take a cup of coffee, or a whole day, to watch offline just a single 10 minute video. Or switch to a full featured browser.

Sorry.



Edited 1 time(s). Last edit at 10/13/2021 03:23PM by JohnHell.

Options: ReplyQuote
Pages: Previous12345Next
Current Page: 4 of 5


K-Meleon forum is powered by Phorum.