From 9cb47b67df2cb6e434a96b87d49348724b335449 Mon Sep 17 00:00:00 2001 From: FPVogel <52160477+FPVogel@users.noreply.github.com> Date: Tue, 25 Aug 2020 05:41:51 +0200 Subject: [PATCH] youtube-dl-gui --- youtube-dl-gui | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 youtube-dl-gui diff --git a/youtube-dl-gui b/youtube-dl-gui new file mode 100644 index 000000000..c75c01c3b --- /dev/null +++ b/youtube-dl-gui @@ -0,0 +1,60 @@ +""" +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to + +""" + +import os +import tkinter as tk + + +def startdl(): + if e3 == "video": + os.system("youtube-dl " + "-" + e1.get() + " " + e2.get()) + else: + os.system("youtube-dl " + " --audio-format " + e3.get() + " -" + e1.get() + " " + e2.get()) + + +master = tk.Tk() +master.title("YouTube-DL Python GUI") +master.geometry("500x100") +tk.Label(master, text="Extra Arguments").grid(row=0) +tk.Label(master, text="I personally recommend wxci").grid(row=0, column=2) +tk.Label(master, text="Download Link").grid(row=1) +tk.Label(master, text="Audio Format").grid(row=2) +tk.Label(master, text="(enter \"video\" for video download)").grid(row=2, column=2) + +e1 = tk.Entry(master) +e2 = tk.Entry(master) +e3 = tk.Entry(master) + +e1.grid(row=0, column=1) +e2.grid(row=1, column=1) +e3.grid(row=2, column=1) + +tk.Button(master, text='Quit', command=master.quit).grid(row=3, column=0, sticky=tk.W, pady=4) +tk.Button(master, text='Download', command=startdl).grid(row=3, column=1, sticky=tk.W, pady=4) + +tk.mainloop()