0
我有一個簡單的Python腳本這需要在剪貼板中,轉移到YouTube-DL鏈接:分配之前)與list of supported site Youtube-dl。如何獲得python腳本支持的網站列表?
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])
我如何檢查root.clipboard_get(以clipboard_link?