0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

yt-dlpをDEから呼び出すwrapper

Last updated at Posted at 2023-04-19

yt-dlpをDE(MATEやcinnamonやxfce4やLXDE)から呼び出すwrapperです。
どうしても、ytdlp-guiが動かなかったので作りました。
DEにランチャを作り、このプログラムを「端末内で実行」するようにしておけば、GUIからyt-dlpが呼び出せます。

yt-dlpのインストール

yay -S yt-dlp

yt-dlpは、URLさえ解れば、ウェブ上の大概の動画とFacebookの動画と、Twitterの一部の動画をダウンロードできます。

wrapper

chmod +x videodownloader.pyとして、実行権を付けておいて下さい。

videodownloader.py
#!/usr/bin/env python3
import subprocess

savedir="/home/user/Videos"
print("Youtube Downloader")
url=input("Input URL:")
subprocess.call(["/usr/bin/yt-dlp","-P",savedir,"--trim-filenames","32",url])
print("Done. Hit enter key")
a=input()
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?