Ich habe einen einfachen Python-Skript, das auf einen Link in der Zwischenablage und Transfer zum youtube-dl nimmt:Youtube-dl. Wie bekomme ich eine Liste der unterstützten Seiten im Python-Skript?
import youtube_dl
import tkinter as tk
import subprocess
import os
root = tk.Tk()
# keep the window from showing
root.withdraw()
# read the clipboard
clipboard_link = root.clipboard_get()
ydl_opts = { "format": "[height<=480]"}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
get_info = ydl.extract_info(clipboard_link, download=False)
#open url in external player
video_url = get_info["url"]
path_to_player = r"C:\Program Files (x86)\K-Lite Codec Pack\MPC-HC64\mpc-hc64.exe"
subprocess.call([path_to_player, video_url])
Wie kann ich ein root.clipboard_get() mit list of supported site vor assign clipboard_link?