PatreonDownloader
PatreonDownloader copied to clipboard
[Idea] Use `youtube-dl` for external videos
First of all, thanks for this great project. It's working perfectly for downloading a lot of attachments (without having to go through each attachment on every post manually).
I'm not sure how feasibly it is, so it's mainly just an idea/suggestion, but some of the sites listed under "Known not implemented or not tested features" are supported by a tool called youtube-dl.
While I don't really have a clue on the most ideal way to implement youtube-dl, it might be worth looking into.
Thanks again for the great tool. Looking forward to further improvements :)
First of all, thank you! I'm really glad that this application is useful for other people.
I do have plans on making plugins utilizing youtube-dl and, possibly gallery-dl to download some of the external urls supported by those applications.
Unfortunately I can't say for sure when this will be implemented but most features listed in "Known not implemented or not tested features" are treated by me as base features of PatreonDownloader and should be implemented before I can call it feature-complete.
Would this plugin merely call the external executable? or execute the python version?
The usage of standalone external executable is preferred.
Ok perfect, I took a look at the code and what you explained in the other issue and I know what can be done to utilize youtube-dl. Unsure how to allow for compatibility between windows and linux however (I can certainly do it for windows)
Cross-platform compatibility is actually quite easy.
bool isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
var process = new Process
{
StartInfo =
{
FileName = $"executable{(isWindows ? ".exe" : "")}",
Arguments = "arguments here",
UseShellExecute = false,
CreateNoWindow = false,
RedirectStandardOutput = true
}
};
process.Start();
// Make sure app has finished the work
process.WaitForExit();
I did get it working as a plugin but I found it to stop downloading a video for some reason and gave up as I had no way to know why youtube-dl "paused." I got frustrated and just wrote out all the YouTube links into a text file that I could then feed into youtube-dl using -a
I can share the plugin code, maybe it will work for someone else but it was dreadfully easy to implement just wasn't sure about reliability as there is no output to the console (maybe redirect standard output flag would help?)
I can share the plugin code, maybe it will work for someone else but it was dreadfully easy to implement just wasn't sure about reliability as there is no output to the console (maybe redirect standard output flag would help?)
Well, I'll leave this decision up to you. I might take a look at it at some point, but I really don't have much free time lately.
#142 fixes this issue. Now the youtube videos are automatically downloaded. I tested it, and it works like a charm :tada: