hpr3695 :: How I watch youtube with newsboat

binrc
语言:English
Source:
Now Playing

1/1hpr3695

00:00
00:00
1 章节
  • 1. hpr3695

关于

Summary: Using youtube's channel RSS feeds to watch youtube from the command line

Source: [http://hackerpublicradio.org/eps.php?id=3695](http://hackerpublicradio.org/eps.php?id=3695)

Original audio: [https://archive.org/download/hpr3695/hpr3695\_source.ogg](https://archive.org/download/hpr3695/hpr3695\_source.ogg)

How I watch youtube with newsboat

===================================

I find that the youtube web ui is designed to keep users on the site by feeding them an unending stream of information. Bright colors, distracting thumbnails, peanut galleries, etc. I prefer to consume my videos in the same way I consume everything else: via RSS.

RSS is my favorite way of aggregating things that other people have made because it allows me, the user, to interact with their things

The only dependencies not on a standard UNIX system are newsboat and a video player. I also use yt-dlp to download videos for later viewing. I like mpv but you can substitute your own.

$ sudo $pkgmrg install newsboat mpv yt-dlp

Getting RSS feeds from youtube

==============================

Youtube (currently) provides RSS feeds for channels.

Finding Youtube channel ID


Sometimes channels have vanity URLs that can make it difficult to find the channel ID. Other times, the URL contains the channel ID. All youtube channel IDs start with the string UC so we can easily grep for them.

$ curl https://www.youtube.com/c/RMCRetro | grep --color "href="https://www.youtube.com/channel/UC"`[ lots of nonsense ]href="https://www.youtube.com/channel/UCLEoyoOKZK0idGqSc6Pi23w"[ lots of nonsense ]

In order to turn this channel ID into something useful, we create the following URL:

https://www.youtube.com/feeds/videos.xml?channel_id=UCLEoyoOKZK0idGqSc6Pi23w

Google takeout can also be used to export youtube subscriptions.

The export format is a CSV that contains the channel IDs for all of our subscriptions.

Channel Id,Channel Url,Channel TitleUCLEoyoOKZK0idGqSc6Pi23w,http://www.youtube.com/channel/UCLEoyoOKZK0idGqSc6Pi23w,RMC - The Cave

Newsboat url list

=================

Newsboat reads it’s list of URLs from ~/.config/newsboat/urls. Every url we add to this list will be automaticlly fetched. You can make separate URL lists for your list of videos and list of standard text based RSS feeds

If you have an exported CSV, you can easily modify it so that newsboat will accept it as a list of URLs by deleting row 1, column 1+comma, and replacing the comma between the URL and channel name with a tab character. Doing a sed 's/channel\//feeds\/videos.xml?channel_id=/g' on the file is an easy way to replace the website URL with the feed url. Newsboat only reads the first field of every row so the channel name can be kept for easier subscription management.

http://www.youtube.com/feeds/videos.xml?channel_id=UCLEoyoOKZK0idGqSc6Pi23w RMC - The Cave

Newsboat config

===============

In order to play videos, we need to add some macros to the newsboat config file at ~/.config/newsboat/config

Mine looks like this.

load URLS on launchauto-reload yes# vim bindsbind-key j downbind-key k upbind-key j next articlelistbind-key k prev articlelistbind-key J next-feed articlelistbind-key K prev-feed articlelistbind-key G endbind-key g homebind-key d pagedownbind-key u pageupbind-key l openbind-key h quitbind-key a toggle-article-readbind-key n next-unreadbind-key N prev-unreadbind-key D pb-downloadbind-key U bashow-urlsbind-key x pb-delete# macro setupbrowser linkhandlermacro , open-in-browser# launch video playermacro v set browser "setsid -f mpv" ; open-in-browser ; set browser linkhandler# download vidoemacro d set browser "yt-dlp"; open-in-browser ; set browser linkhandler# download audio onlymacro a set browser "yt-dlp --embed-medatada -xic -f bestaudio/best" ; open-in-browser ; set browser linkhandler

Video demo

==========

This is a demo of using newsboat with videos. In order to execute the macros, you type , then v or whatever other letter you set the macro to.

video in webm format your web browser or operating system does not support free video codecs :(

A url list to get you started

=============================

https://www.youtube.com/feeds/videos.xml?channel_id=UC3ts8coMP645hZw9JSD3pqQ Andreas Klinghttps://www.youtube.com/feeds/videos.xml?channel_id=UC9-y-6csu5WGm29I7JiwpnA Computerphilehttps://www.youtube.com/feeds/videos.xml?channel_id=UC15BJjhPr4d5gTClhmC4HRw Elliot Collhttps://www.youtube.com/feeds/videos.xml?channel_id=UCxQKHvKbmSzGMvUrVtJYnUA Learn Linux TVhttps://www.youtube.com/feeds/videos.xml?channel_id=UCm9K6rby98W8JigLoZOh6FQ LockPickingLawyerhttps://www.youtube.com/feeds/videos.xml?channel_id=UCl2mFZoRqjw_ELax4Yisf6w Louis Rossmannhttps://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA Luke Smithhttps://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA Mental Outlawhttps://www.youtube.com/feeds/videos.xml?channel_id=UCjFaPUcJU1vwk193mnW_w1w Modern Vintage Gamerhttps://www.youtube.com/feeds/videos.xml?channel_id=UCLEoyoOKZK0idGqSc6Pi23w RMC - The Cavehttps://www.youtube.com/feeds/videos.xml?channel_id=UC4rqhyiTs7XyuODcECvuiiQ Scott The Wozhttps://www.youtube.com/feeds/videos.xml?channel_id=UC5I2hjZYiW9gZPVkvzM8_Cw Techmoanhttps://www.youtube.com/feeds/videos.xml?channel_id=UCy0tKL1T7wFoYcxCe0xjN6Q Technology Connectionshttps://www.youtube.com/feeds/videos.xml?channel_id=UC8uT9cgJorJPWu7ITLGo9Ww The 8-Bit Guyhttps://www.youtube.com/feeds/videos.xml?channel_id=UC5UAwBUum7CPN5buc-_N1Fw The Linux Experimenthttps://www.youtube.com/feeds/videos.xml?channel_id=UCFMx-JitepTttWc-ABHhu8A This Week in Retrohttps://www.youtube.com/feeds/videos.xml?channel_id=UCsnGwSIHyoYN0kiINAGUKxg Wolfgang's Channelhttps://www.youtube.com/feeds/videos.xml?channel_id=UCJ8V9aiz50m6NVn0ix5v8RQ decino

评论

成为第一个评论的人

此内容还没有任何评论。开始对话吧!

标签: hpr3695 :: How I watch youtube with newsboat audio, hpr3695 :: How I watch youtube with newsboat - binrc audio, free audiobook, free audio book, audioaz

SPONSORED AD