Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate with Electron #6143

Closed
steelbrain opened this issue Jul 3, 2015 · 3 comments
Closed

Integrate with Electron #6143

steelbrain opened this issue Jul 3, 2015 · 3 comments

Comments

@steelbrain
Copy link

@steelbrain steelbrain commented Jul 3, 2015

I am trying to extract a few videos from URLs like http://kasa.com/2015/06/19/saving-your-vacation/
They have iframes and sometimes flash objects that are added using javascript on document ready and stuff, and Electron supports headless DOM interactions and programmatic usage.
So I want to load urls in electron and when their document is ready and all the content is loaded, I wanna pass that document's current HTML to youtube-dl to extract and do it's magic on.
Does Youtube-DL supports HTML input like that? if not then can we get it any time soon?

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jul 3, 2015

Even if it would only be used for the generic extractor, I don't like that option too much since we could also need the url for cases where the files are specified as relative paths. I understand that only giving the urls wouldn't be enough because the content is generated with JS, but I think that the proper way is to add a new extractor for that site (feel free to open a new issue and if you have spare time you can try to implement it yourself), I would doubt that it can't be reproduced using python.

Alternative approach: You can always start an http server that servers the webpage and run youtube-dl localhost:<random port>, it's not pretty but it should work.

@steelbrain
Copy link
Author

@steelbrain steelbrain commented Jul 3, 2015

@jaimeMF I just had another idea, since electron is all nodejs and chromium, maybe we could spawn it and listen on a port to proxify the requests, specify it as a proxy in youtube-dl. and then it loads those pages in itself and when the DOM triggers the DOMContentLoaded event, we could complete the proxification event!

@steelbrain
Copy link
Author

@steelbrain steelbrain commented Jul 3, 2015

😞 didn't work. I think I am gonna write site rules then. Thanks.

@steelbrain steelbrain closed this Jul 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.