brozzler icon indicating copy to clipboard operation
brozzler copied to clipboard

Feature request: Pass rendered DOM to youtube-dl instead of asking youtube-dl to download the page from the original URL

Open ctsrc opened this issue 8 years ago • 4 comments

Many sites add video dynamically with JavaScript (such as what turned out to be the case with issue #104).

youtube-dl does not execute JavaScript. Instead, where video is added dynamically, youtube-dl relies on custom code for getting the video URLs for a page.

That works great when someone has written an extractor already, but in a lot of cases there has not been written any such extractor.

If instead of asking youtube-dl to download from the original URL, the rendered DOM was passed to youtube-dl then in cases where the JavaScript execution that has happened placed <video> and <source> tags in the DOM, youtube-dl should be able to find the video.

In other situations, passing the rendered DOM instead might possibly make it so that youtube-dl fails instead. In that case, perhaps it could be an option that you provide to brozzler-new-site whether to pass rendered DOM or have youtube-dl download the page from the original URL.

Let me know what you think. I know that feature requests in general are tall orders but I believe this would be useful and I hope you will consider it.

ctsrc avatar Apr 06 '18 17:04 ctsrc

This is a cool idea. But it's one of those things that I probably won't have time to implement myself (unless it happens to be needed to solve some issue that comes up at work). Contributions are most welcome though, and I'm happy to help point you in the right direction.

nlevitt avatar Apr 06 '18 18:04 nlevitt

Understandable :) I am a bit too busy myself for this atm but I would like to give it a shot in the future.

Can you "assign" this issue to me in GitHub so that I don't forget about it?

ctsrc avatar Apr 06 '18 19:04 ctsrc

I know this issue is over 2 years old, but has there been any progress on it?

Brycey92 avatar Nov 06 '20 21:11 Brycey92

I’ve not yet gotten around to it @Brycey92, and am currently busy still. If anyone else wants to take it on feel free to. Otherwise I will get around to it sometime. Hopefully sooner than in another two years :p

ctsrc avatar Nov 16 '20 20:11 ctsrc