在Emacs中用elfeed查看YouTube订阅
依赖
- Emacs
- elfeed
- youtube-dl
准备
从 subscrition manager 处下载订阅的 xml
文件. 这个链接位于页面靠近底部的位置,名叫 “Export subscriptions”.
添加URL到 elfeed-feeds
中:
(setq elfeed-feeds '("https://www.youtube.com/feeds/videos.xml?channel_id=UC0sytTpk1adR_cfjHhiJ08Q"))
更新初始化文件
;; Set executable path (setq youtube-dl-path "/usr/bin/youtube-dl") ;; Set video storage path (setq youtube-dl-output-dir "~/Videos/") (defun elfeed-download-video () "Download a video using youtube-dl." (interactive) (async-shell-command (format "%s -o \"%s%s\" -f bestvideo+bestaudio %s" youtube-dl-path youtube-dl-output-dir "%(title)s.%(ext)s" (elfeed-entry-link elfeed-show-entry)))) ;; Add `youtube` tag to all videos (add-hook 'elfeed-new-entry-hook (elfeed-make-tagger :feed-url "youtube\\.com" :add '(video youtube)))